klyn.time.Duration.toString
method
public override toString(format as String = "%h h %m m %s s") as String:
Description
Returns a string representation of this Duration. Supported placeholders: `%h` for hours, `%m` for minutes and `%s` for seconds.
import klyn.time

duration = Duration(0, 0, 0, 3661)
print(duration.toString())  # 1 h 1 m 1 s
Parameters
  • format The format string for the output.
Returns
A string representation of this Duration object. ```klyn import klyn.time duration = Duration(0, 0, 0, 3661) print(duration.toString()) # 1 h 1 m 1 s ```