Skip to content

Commit

Permalink
Merge pull request #18 from azuqua/OKTA-558567-fix-vuln-deps
Browse files Browse the repository at this point in the history
[OKTA-558567] fix vulnerable dependencies
  • Loading branch information
RonnyChan-okta authored Jan 12, 2023
2 parents 4bcace7 + 5d0f39e commit ea7ec5f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ license = "MIT"
name = "spork"
readme = "README.md"
repository = "https://github.com/azuqua/spork.rs"
version = "0.1.0"
version = "0.1.1"

[dependencies]
chrono = "0.3"
chrono = "0.4.23"
kernel32-sys = "0.2"
libc = "0.2"
psapi-sys = "0.1"
sys-info = "0.5.6"
sys-info = "0.9.1"
thread-id = "3.0"
winapi = "0.2"

[dependencies.mach]
git = "https://github.com/azuqua/mach"

[dev-dependencies]
rand = "0.3.15"
rand = "0.8.5"

[features]
compile_unimplemented = []
Expand Down
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ impl From<sys_info::Error> for SporkError {
}
sys_info::Error::ExecFailed(e) => SporkError::new(SporkErrorKind::Unknown, e.to_string()),
sys_info::Error::IO(e) => SporkError::new(SporkErrorKind::Unknown, e.to_string()),
sys_info::Error::SystemTime(e) => SporkError::new(SporkErrorKind::Unknown, e.to_string()),
sys_info::Error::General(e) => SporkError::new(SporkErrorKind::Unknown, e),
sys_info::Error::Unknown => {
SporkError::new(SporkErrorKind::Unknown, "Sys_info encountered an unknown error.")
}
Expand Down
4 changes: 2 additions & 2 deletions src/utils.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use chrono::UTC;
use chrono::Utc;
use sys_info;
use thread_id;

Expand Down Expand Up @@ -130,7 +130,7 @@ pub fn calc_duration(kind: &StatType, history: &History, started: i64, polled: i
}

pub fn now_ms() -> i64 {
let now = UTC::now();
let now = Utc::now();
(now.timestamp() * 1000 + (now.timestamp_subsec_millis() as i64)) as i64
}

Expand Down
4 changes: 2 additions & 2 deletions tests/cpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use std::time;

use self::rand::distributions::{IndependentSample, Range};

use chrono::UTC;
use chrono::Utc;

macro_rules! sleep_ms(
($($arg:tt)*) => { {
Expand All @@ -27,7 +27,7 @@ fn fib(n: u64) -> u64 {
}

fn now_ms() -> i64 {
let now = UTC::now();
let now = Utc::now();
(now.timestamp() * 1000 + (now.timestamp_subsec_millis() as i64)) as i64
}

Expand Down

0 comments on commit ea7ec5f

Please sign in to comment.