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