time/Duration
module methods:
value methods:
Nanosecond
Create a time/Duration value, int
is 1 as default.
(time/Duration Nanosecond [int]) -> duration
Microsecond
Create a time/Duration value, int
is 1 as default.
(time/Duration Microsecond [int]) -> duration
Millisecond
Create a time/Duration value, int
is 1 as default.
(time/Duration Millisecond [int]) -> duration
Second
Create a time/Duration value, int
is 1 as default.
(time/Duration Second [int]) -> duration
Minute
Create a time/Duration value, int
is 1 as default.
(time/Duration Minute [int]) -> duration
Hour
Create a time/Duration value, int
is 1 as default.
(time/Duration Hour [int]) -> duration
nanoseconds
Returns the duration as an integer nanosecond count.
(time/Duration nanoseconds) -> int
microseconds
Returns the duration as an integer microsecond count.
(time/Duration microseconds) -> int
milliseconds
Returns the duration as an integer millisecond count.
(time/Duration milliseconds) -> int
seconds
Returns the duration as a floating point number of seconds.
(time/Duration seconds) -> float
minutes
Returns the duration as a floating point number of minutes.
(time/Duration minutes) -> float
hours
Returns the duration as a floating point number of hours.
(time/Duration hours) -> float
round
Returns the result of rounding time/Duration
to the nearest multiple of
duration
. The rounding behavior for halfway values is to round away from
zero. If the result exceeds the maximum (or minimum) value that can be stored
in a Duration, round returns the maximum (or minimum) duration.
If duration
<= 0, round returns time/Duration
unchanged.
(time/Duration round duration) -> duration
truncate
Returns the result of rounding time/Duration
toward zero to a multiple of
duration
. If duration
<= 0, truncate returns time/Duration
unchanged.
(time/Duration truncate duration) -> duration