Struct core.time.Duration
Represents a duration of time of weeks or less (kept internally as hnsecs). (e.g. 22 days or 700 seconds).
						
				struct Duration
				;
						
					
				It is used when representing a duration of time - such as how long to
    sleep with core.
In std.datetime, it is also used as the result of various arithmetic operations on time points.
    Use the dur function or one of its non-generic aliases to create
    Durations.
    It's not possible to create a Duration of months or years, because the
    variable number of days in a month or year makes it impossible to convert
    between months or years and smaller units without a specific date. So,
    nothing uses Durations when dealing with months or years. Rather,
    functions specific to months and years are defined. For instance,
    std has add!"years" and add!"months" for adding
    years and months rather than creating a Duration of years or months and
    adding that to a std. But Duration is used when dealing
    with weeks or smaller.
Properties
| Name | Type | Description | 
|---|---|---|
| isNegative[get] | bool | Returns whether this Durationis negative. | 
| max[get] | Duration | Largest Durationpossible. | 
| min[get] | Duration | Most negative Durationpossible. | 
| total[get] | long | Returns the total number of the given units in this Duration.
        So, unlikesplit, it does not strip out the larger units. | 
| zero[get] | Duration | A Durationof0. It's shorter than doing something likedur!"seconds"(0)and more explicit thanDuration. | 
Methods
| Name | Description | 
|---|---|
| opBinary(rhs) | Adds, subtracts or calculates the modulo of two durations. | 
| opBinary(value) | Multiplies or divides the duration by an integer value. | 
| opBinary(rhs) | Divides two durations. | 
| opBinaryRight(lhs) | TickDuration is Deprecated | 
| opBinaryRight(value) | Multiplies an integral value and a Duration. | 
| opCast() | TickDuration is Deprecated | 
| opCast() | Allow Duration to be used as a boolean. | 
| opCmp(rhs) | Compares this Durationwith the givenDuration. | 
| opOpAssign(rhs) | Adds, subtracts or calculates the modulo of two durations as well as
        assigning the result to this Duration. | 
| opOpAssign(value) | Multiplies/Divides the duration by an integer value as well as
        assigning the result to this Duration. | 
| opUnary() | Returns the negation of this Duration. | 
| toString(sink) | Converts this Durationto astring. | 
| toString() | Returns the total number of the given units in this Duration.
        So, unlikesplit, it does not strip out the larger units. | 
Templates
| Name | Description | 
|---|---|
| split | Splits out the Duration into the given units. | 
Examples
import stdExample
import coreAuthors
Jonathan M Davis and Kato Shoichi