FormatDuration formats a duration (nanoseconds) as a human-readable string. Uses the most appropriate unit: ns, us, ms, s, m, h, or combinations.
(nanos int64)
| 102 | // FormatDuration formats a duration (nanoseconds) as a human-readable string. |
| 103 | // Uses the most appropriate unit: ns, us, ms, s, m, h, or combinations. |
| 104 | func FormatDuration(nanos int64) string { |
| 105 | d := time.Duration(nanos) |
| 106 | // Use Go's standard duration formatting for precision |
| 107 | return d.String() |
| 108 | } |
| 109 | |
| 110 | // Term represents the building blocks of datalog programs, namely constants, variables, atoms, |
| 111 | // and also negated atoms, equality and inequality. |
no test coverage detected