Skip to main content

DurationToString

DurationToString converts the duration to a string suffix that indicates the scale of the timer.

def DurationToString(
duration: time.Duration
) - > string

Converts the duration to a string suffix that indicates the scale of the timer.

Parameters

NameTypeDescription
durationtime.DurationThe duration value to convert into a string suffix.

Returns

TypeDescription
stringA string suffix representing the scale of the duration (e.g., "h" for hours, "ms" for milliseconds, "ns" for nanoseconds).