envzn
0.8 · beta · not released

Library / Date and time / Date and time / TimeConstants

CLASS

TimeConstants

The fixed factors between time units, in one place.

Fields 7

int64 MS_PER_SECOND

1_000 — milliseconds in a second.

int64 MS_PER_MINUTE

60_000 — milliseconds in a minute (60 x MS_PER_SECOND).

int64 MS_PER_HOUR

3_600_000 — milliseconds in an hour (60 x MS_PER_MINUTE).

int64 MS_PER_DAY

86_400_000 — milliseconds in a day (24 x MS_PER_HOUR). A NOMINAL day: this is duration arithmetic, which knows nothing of leap seconds or of the 23- and 25-hour days a DST transition produces. Calendar-aware arithmetic belongs to `DateTime`, not here.

int64 NS_PER_MICROSECOND

1_000 — nanoseconds in a microsecond.

int64 NS_PER_MILLISECOND

1_000_000 — nanoseconds in a millisecond.

int64 NS_PER_SECOND

1_000_000_000 — nanoseconds in a second.