xref: /DragonOS/kernel/src/time/mod.rs (revision 52ab5d904e307e92fc6c323e1834bb0dbc432dcd)
1 pub mod sleep;
2 pub mod timekeep;
3 pub mod timer;
4 
5 /// 表示时间的结构体
6 #[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
7 pub struct TimeSpec {
8     pub tv_sec: i64,
9     pub tv_nsec: i64,
10 }
11 
12 impl TimeSpec {
13     pub fn new(sec: i64, nsec: i64) -> TimeSpec {
14         return TimeSpec {
15             tv_sec: sec,
16             tv_nsec: nsec,
17         };
18     }
19 }
20