ext/pf2/src/session/configuration.rs in pf2-0.5.1 vs ext/pf2/src/session/configuration.rs in pf2-0.5.2
- old
+ new
@@ -4,12 +4,19 @@
use rb_sys::*;
use crate::util::cstr;
+#[cfg(target_os = "linux")]
pub const DEFAULT_SCHEDULER: Scheduler = Scheduler::Signal;
-pub const DEFAULT_INTERVAL: Duration = Duration::from_millis(49);
+#[cfg(target_os = "linux")]
pub const DEFAULT_TIME_MODE: TimeMode = TimeMode::CpuTime;
+#[cfg(not(target_os = "linux"))]
+pub const DEFAULT_SCHEDULER: Scheduler = Scheduler::TimerThread;
+#[cfg(not(target_os = "linux"))]
+pub const DEFAULT_TIME_MODE: TimeMode = TimeMode::WallTime;
+
+pub const DEFAULT_INTERVAL: Duration = Duration::from_millis(49);
#[derive(Clone, Debug)]
pub struct Configuration {
pub scheduler: Scheduler,
pub interval: Duration,