Skip to content

TimeFormatter

Namespace: TrganReport.Utils

Provides a human-readable formatting utility for TimeSpan values. Converts durations into compact strings like "999ms" or "12h 59m 59s".

public static class TimeFormatter

Inheritance ObjectTimeFormatter

Methods

Format(TimeSpan)

Formats a TimeSpan into a readable string.

public static string Format(TimeSpan duration)

Parameters

duration TimeSpan
The duration to format.

Returns

String
A formatted string representing the duration.