| 1 | pub const epoch = @import("time/epoch.zig"); |
| 2 | |
| 3 | // Divisions of a nanosecond. |
| 4 | pub const ns_per_us = 1000; |
| 5 | pub const ns_per_ms = 1000 * ns_per_us; |
| 6 | pub const ns_per_s = 1000 * ns_per_ms; |
| 7 | pub const ns_per_min = 60 * ns_per_s; |
| 8 | pub const ns_per_hour = 60 * ns_per_min; |
| 9 | pub const ns_per_day = 24 * ns_per_hour; |
| 10 | pub const ns_per_week = 7 * ns_per_day; |
| 11 | |
| 12 | // Divisions of a microsecond. |
| 13 | pub const us_per_ms = 1000; |
| 14 | pub const us_per_s = 1000 * us_per_ms; |
| 15 | pub const us_per_min = 60 * us_per_s; |
| 16 | pub const us_per_hour = 60 * us_per_min; |
| 17 | pub const us_per_day = 24 * us_per_hour; |
| 18 | pub const us_per_week = 7 * us_per_day; |
| 19 | |
| 20 | // Divisions of a millisecond. |
| 21 | pub const ms_per_s = 1000; |
| 22 | pub const ms_per_min = 60 * ms_per_s; |
| 23 | pub const ms_per_hour = 60 * ms_per_min; |
| 24 | pub const ms_per_day = 24 * ms_per_hour; |
| 25 | pub const ms_per_week = 7 * ms_per_day; |
| 26 | |
| 27 | // Divisions of a second. |
| 28 | pub const s_per_min = 60; |
| 29 | pub const s_per_hour = s_per_min * 60; |
| 30 | pub const s_per_day = s_per_hour * 24; |
| 31 | pub const s_per_week = s_per_day * 7; |
| 32 | |
| 33 | test { |
| 34 | _ = epoch; |
| 35 | } |