diff options
| author | Fuwn <[email protected]> | 2021-05-26 22:20:17 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-05-26 22:20:17 +0000 |
| commit | be6cf65103b9484ead78060dd085a5f29a5b00e1 (patch) | |
| tree | f3961829a82e8285fc4c6f8e640ee37ee1f6e153 | |
| parent | style(whirl): remove more singleton use statements (diff) | |
| download | whirl-be6cf65103b9484ead78060dd085a5f29a5b00e1.tar.xz whirl-be6cf65103b9484ead78060dd085a5f29a5b00e1.zip | |
style(whirl_api): remove singleton uses
| -rw-r--r-- | crates/whirl_api/src/routes/stats/mod.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/whirl_api/src/routes/stats/mod.rs b/crates/whirl_api/src/routes/stats/mod.rs index d5d0937..5a41630 100644 --- a/crates/whirl_api/src/routes/stats/mod.rs +++ b/crates/whirl_api/src/routes/stats/mod.rs @@ -5,7 +5,6 @@ pub mod structures; use actix_web::HttpResponse; use sysinfo::{get_current_pid, ProcessExt, System, SystemExt}; -use whirl_common::system::seconds_to_hrtime; use crate::routes::stats::structures::{Statistics, StatisticsProcess, StatisticsSystem}; @@ -21,7 +20,9 @@ pub fn statistics() -> HttpResponse { system: StatisticsSystem { os_type: sys.get_name().unwrap(), release: sys.get_kernel_version().unwrap(), - uptime: seconds_to_hrtime(sysinfo::System::new().get_uptime() as usize), + uptime: whirl_common::system::seconds_to_hrtime( + sysinfo::System::new().get_uptime() as usize + ), }, process: StatisticsProcess { // (process.cpu_usage() * 100.0).round() / 100.0 |