-
Notifications
You must be signed in to change notification settings - Fork 67
Duration Type
Jeremie Rossignol edited this page May 21, 2016
·
11 revisions
The duration data type is used anywhere that a contract parameter requests a duration of time. Can be specified with units of y, d, h, m, s.
Example: 2d 4h
is 2 days and 4 hours.
Durations can also be used in arithmatic (30d - 2h 30m) or comparisons (30d > 2h 30m).
Local Functions
Function Signature | Description |
---|---|
Duration Random( Duration min, Duration max)
|
Returns a random Duration that is greater than or equal to min, but less than max. |
Duration Round( Duration value, Duration precision)
|
Rounds the number to the nearest multiple of precision . For example Round(4d 2h, 1d) would return 4d . |
double ToDouble()
|
Returns the Duration as a double value in seconds. |
Global Functions
Function Signature | Description |
---|---|
Duration Duration(val)
|
Casts the given value to a Duration. |
- General Types
- KSP Types
- Contract Configurator Objects
- Other
- Global Functions
Contract Configurator
Configuration File Syntax
Extending Contract Configurator