scoop:scoop.std:0.1.0
src/time/duration_units.scoop
Selected production source · src/time/duration_units.scoop
1
package scoop.time3
/**4
* Constructs an elapsed duration of this many nanoseconds with checked overflow.5
*/6
public fun Int.nanoseconds(): Duration = Duration.nanoseconds(toLong())7
/**8
* Constructs an elapsed duration of this many nanoseconds with checked overflow.9
*/10
public fun Long.nanoseconds(): Duration = Duration.nanoseconds(this)11
/**12
* Constructs an elapsed duration of this many microseconds with checked overflow.13
*/14
public fun Int.microseconds(): Duration = Duration.microseconds(toLong())15
/**16
* Constructs an elapsed duration of this many microseconds with checked overflow.17
*/18
public fun Long.microseconds(): Duration = Duration.microseconds(this)19
/**20
* Constructs an elapsed duration of this many milliseconds with checked overflow.21
*/22
public fun Int.milliseconds(): Duration = Duration.milliseconds(toLong())23
/**24
* Constructs an elapsed duration of this many milliseconds with checked overflow.25
*/26
public fun Long.milliseconds(): Duration = Duration.milliseconds(this)27
/**28
* Constructs an elapsed duration of this many seconds with checked overflow.29
*/30
public fun Int.seconds(): Duration = Duration.seconds(toLong())31
/**32
* Constructs an elapsed duration of this many seconds with checked overflow.33
*/34
public fun Long.seconds(): Duration = Duration.seconds(this)35
/**36
* Constructs an elapsed duration of this many minutes with checked overflow.37
*/38
public fun Int.minutes(): Duration = Duration.minutes(toLong())39
/**40
* Constructs an elapsed duration of this many minutes with checked overflow.41
*/42
public fun Long.minutes(): Duration = Duration.minutes(this)43
/**44
* Constructs an elapsed duration of this many hours with checked overflow.45
*/46
public fun Int.hours(): Duration = Duration.hours(toLong())47
/**48
* Constructs an elapsed duration of this many hours with checked overflow.49
*/50
public fun Long.hours(): Duration = Duration.hours(this)51
/**52
* Constructs an elapsed duration of this many days with checked overflow.53
*/54
public fun Int.days(): Duration = Duration.days(toLong())55
/**56
* Constructs an elapsed duration of this many days with checked overflow.57
*/58
public fun Long.days(): Duration = Duration.days(this)