dia_time/
nanos.rs

1/*
2==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--
3
4Dia-Time
5
6Copyright (C) 2018-2022, 2024  Anonymous
7
8There are several releases over multiple years,
9they are listed as ranges, such as: "2018-2022".
10
11This program is free software: you can redistribute it and/or modify
12it under the terms of the GNU Lesser General Public License as published by
13the Free Software Foundation, either version 3 of the License, or
14(at your option) any later version.
15
16This program is distributed in the hope that it will be useful,
17but WITHOUT ANY WARRANTY; without even the implied warranty of
18MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19GNU Lesser General Public License for more details.
20
21You should have received a copy of the GNU Lesser General Public License
22along with this program.  If not, see <https://www.gnu.org/licenses/>.
23
24::--::--::--::--::--::--::--::--::--::--::--::--::--::--::--::--
25*/
26
27//! # Some constants in nanoseconds
28
29/// # 1 second in nanoseconds
30pub const SECOND: u64 = 1_000_000_000;
31
32/// # 1 minute in nanoseconds
33pub const MINUTE: u64 = 60_000_000_000;
34
35/// # 1 hour in nanoseconds
36pub const HOUR: u64 = 3_600_000_000_000;
37
38/// # 1 day in nanoseconds
39pub const DAY: u64 = 86_400_000_000_000;
40
41/// # 1 week in nanoseconds
42pub const WEEK: u64 = 604_800_000_000_000;