Duration
classin packageklyn.time
public class Duration extends Object implements ValueType:
Represents a duration of time.
This class provides methods to create and manipulate durations.
It supports initialization from individual time components and
provides arithmetic operations.
import klyn.time
duration = Duration(0, 0, 0, 3600)
print(duration.toString()) # Output: 1 h 0 m 0 s
@since 1.0
Properties
| Modifier and Type |
Member |
Description |
| public readonly property |
totalSeconds |
Returns the total number of seconds in the duration. |
Constructors
| Modifier and Type |
Member |
Description |
| public |
Duration |
Constructs a Duration object from individual time components. |
Methods
| Modifier and Type |
Member |
Description |
| public override |
toString |
Returns a string representation of this Duration. |
Operators