Browse Source

remove unnecessary cast

tags/v1.5.1
Jonathan Strong 8 months ago
parent
commit
52e029809c
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      Cargo.lock
  2. +1
    -1
      src/main.rs

+ 1
- 1
Cargo.lock View File

@@ -441,7 +441,7 @@ checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"

[[package]]
name = "utcnow"
version = "1.5.0"
version = "1.5.1"
dependencies = [
"chrono",
"chrono-tz",


+ 1
- 1
src/main.rs View File

@@ -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> {


Loading…
Cancel
Save