|
|
@@ -12,7 +12,7 @@ fn nanos(utc: DateTime<Utc>) -> u64 { |
|
|
|
fn get_time() -> (i64, i32) { |
|
|
|
let mut tv = libc::timespec { tv_sec: 0, tv_nsec: 0 }; |
|
|
|
unsafe { libc::clock_gettime(libc::CLOCK_REALTIME, &mut tv); } |
|
|
|
(tv.tv_sec as i64, tv.tv_nsec as i32) |
|
|
|
(tv.tv_sec, tv.tv_nsec as i32) |
|
|
|
} |
|
|
|
|
|
|
|
fn timespec_to_utc(sec: i64, nsec: i32) -> DateTime<Utc> { |
|
|
|