Documentation
¶
Overview ¶
Package timeutil converts between the units time is counted in across the framework.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NanosecondsToString ¶ added in v1.2.0
NanosecondsToString renders a count of nanoseconds as H:MM:SS.ffffff, the part below a microsecond dropped. The hours are not capped, so a long run reads 100:00:00.000000 rather than wrapping. Integer arithmetic keeps every microsecond exact, which float seconds would not.
func SecondsToDuration ¶
SecondsToDuration is SecondsToNanoseconds as a time.Duration.
func SecondsToNanoseconds ¶
SecondsToNanoseconds converts seconds to nanoseconds, rounded to the nearest one: the float product can land just below the exact count (1.001 s gives 1000999999.9999999), and truncating it would put the time a nanosecond early.
Types ¶
This section is empty.