aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/whirl_api/src/routes/stats/mod.rs5
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