From 31959480be42a50edf74502d6f1c21ce83962ed8 Mon Sep 17 00:00:00 2001 From: Jonathan Strong Date: Thu, 30 Nov 2017 18:00:24 -0500 Subject: [PATCH] remove shuteye dep --- Cargo.toml | 2 +- src/influx.rs | 9 +++++---- src/latency.rs | 3 +-- src/lib.rs | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9927c47..29257a5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ termion = "1.4.0" slog = "2.0.6" sloggers = "0.2" slog-term = "2" -shuteye = "^0" +# shuteye = "^0" # chashmap = "2" windows = { path = "../windows" } diff --git a/src/influx.rs b/src/influx.rs index 2df7379..21ad4b9 100644 --- a/src/influx.rs +++ b/src/influx.rs @@ -17,7 +17,6 @@ use influent::measurement::{Measurement, Value}; use zmq; use chrono::{DateTime, Utc, TimeZone}; use sloggers::types::Severity; -use shuteye; use super::{nanos, file_logger}; use warnings::Warning; @@ -568,9 +567,11 @@ impl InfluxWriter { if end { break } - if !rcvd_msg { - #[cfg(feature = "no-thrash")] - shuteye::sleep(Duration::new(0, 5000)); + #[cfg(feature = "no-thrash")] + { + if !rcvd_msg { + thread::sleep(Duration::new(0, 5000)); + } } } diff --git a/src/latency.rs b/src/latency.rs index 807e321..60e3cfe 100644 --- a/src/latency.rs +++ b/src/latency.rs @@ -10,7 +10,6 @@ use pub_sub::PubSub; use zmq; use influent::measurement::{Measurement, Value}; use sloggers::types::Severity; -use shuteye; //use chashmap::CHashMap; use windows::{DurationWindow, Incremental, Window}; @@ -388,7 +387,7 @@ impl Manager { debug!(logger, "sent broadcast"); } else { #[cfg(feature = "no-thrash")] - shuteye::sleep(Duration::new(0, 1000)); + thread::sleep(Duration::new(0, 1000)); } if terminate { break } diff --git a/src/lib.rs b/src/lib.rs index d654169..406d963 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -15,7 +15,7 @@ extern crate termion; //extern crate pub_sub; extern crate sloggers; extern crate slog_term; -extern crate shuteye; +//extern crate shuteye; //extern crate chashmap; extern crate windows;