durationConstants {humanFormat} | R Documentation |
Duration constants
Description
These constants are used to express the number of nanoseconds in different time units.
Usage
kNanosecond
kMicrosecond
kMillisecond
kSecond
kMinute
kHour
Details
These are useful for computing specific time durations or for converting from quantities in one unit to another unit (e.g. time in milliseconds to time in nanoseconds for duration formatting).
-
kNanosecond
: One nanosecond; -
kMicrosecond
: One microsecond (1000 nanosecond); -
kMillisecond
: One millisecond (1000 microseconds); -
kSecond
: One second (1000 milliseconds); -
kMinute
: One minute (60 seconds); -
kHour
: One hour (60 minutes).
Examples
# To calculate 4 minute, 3 seconds and 14 microseconds:
4*kMinute + 3*kSecond + 14*kMicrosecond
[Package humanFormat version 1.2 Index]