@@ -13,6 +13,7 @@ pub-sub = "2.0" | |||||
slog = "2.0.6" | slog = "2.0.6" | ||||
sloggers = "0.2" | sloggers = "0.2" | ||||
slog-term = "2" | slog-term = "2" | ||||
shuteye = "^0" | |||||
windows = { path = "../windows" } | windows = { path = "../windows" } | ||||
money = { path = "../money" } | money = { path = "../money" } | ||||
@@ -417,7 +417,7 @@ impl InfluxWriter { | |||||
if !rcvd_msg { | if !rcvd_msg { | ||||
#[cfg(feature = "no-thrash")] | #[cfg(feature = "no-thrash")] | ||||
thread::sleep(Duration::from_millis(1) / 10); | |||||
shuteye::sleep(Duration::new(0, 5000)); | |||||
} | } | ||||
} | } | ||||
@@ -10,6 +10,7 @@ use pub_sub::PubSub; | |||||
use zmq; | use zmq; | ||||
use influent::measurement::{Measurement, Value}; | use influent::measurement::{Measurement, Value}; | ||||
use sloggers::types::Severity; | use sloggers::types::Severity; | ||||
use shuteye; | |||||
use windows::{DurationWindow, Incremental}; | use windows::{DurationWindow, Incremental}; | ||||
use money::{Ticker, Side, ByExchange, Exchange}; | use money::{Ticker, Side, ByExchange, Exchange}; | ||||
@@ -402,7 +403,7 @@ impl Manager { | |||||
debug!(logger, "sent broadcast"); | debug!(logger, "sent broadcast"); | ||||
} else { | } else { | ||||
#[cfg(feature = "no-thrash")] | #[cfg(feature = "no-thrash")] | ||||
thread::sleep(Duration::from_millis(1) / 10); | |||||
shuteye::sleep(Duration::new(0, 1000)); | |||||
} | } | ||||
if terminate { break } | if terminate { break } | ||||
@@ -15,6 +15,7 @@ extern crate termion; | |||||
extern crate pub_sub; | extern crate pub_sub; | ||||
extern crate sloggers; | extern crate sloggers; | ||||
extern crate slog_term; | extern crate slog_term; | ||||
extern crate shuteye; | |||||
extern crate windows; | extern crate windows; | ||||