Duration (time)
Visit core types for information on whole number.
The duration type is used for expressing intervals of time. It is a unary post-fix operator, which means you specify any value that resolves to a whole number
and then follow it by the name of a time unit. The possible time units are:
milliseconds
seconds
minutes
hours
days
Here are some self-explanatory examples:
5 days 4 minutes 2 milliseconds
One oddity with this syntax is that you must specify the plural form even for a value of 1
for example:
1 seconds 1 minutes 1 days 1 hours
Here is a more complex example involving an expression, this one expresses a duration of 6 hours:
(2 + 4) hours
Partial Durations
You can add durations together (like other arithmetic values) to express partial time durations, this one for example expresses 2 minutes and 35 seconds:
2 minutes + 35 seconds