pub fn with_freq<S>(tag: S, freq_in_hz: u32) -> DynamicSleep
  where
    S: Into<String>,
  {
    DynamicSleep {
      tag: tag.into(),
      _freq: freq_in_hz,
      _period_nanos: hz_to_nanos(freq_in_hz),
      last_instant: None,
      cycles: 0,
      slips: 0,
    }
  }
/// Create a new instance with a custom frequency.
/// If logging is enabled, tag is used to mark the log messages
Create a new instance with a custom frequency.
If logging is enabled, tag is used to mark the log messages
Create a new instance with a custom frequency . If logging is enabled tag is used to mark the log messages
pub fn with_freq<S>(tag: S, freq_in_hz: u32) -> DynamicSleep
  where
    S: Into<String>,
  {
    DynamicSleep {
      tag: tag.into(),
      _freq: freq_in_hz,
      _period_nanos: hz_to_nanos(freq_in_hz),
      last_instant: None,
      cycles: 0,
      slips: 0,
    }
  }
pub fn with_freq < S > ( tag : S , freq_in_hz : u32 ) -> DynamicSleep where S : Into < String > , { DynamicSleep { tag : tag . into ( ) , _freq : freq_in_hz , _period_nanos : hz_to_nanos ( freq_in_hz ) , last_instant : None , cycles : 0 , slips : 0 , } }
Create a new instance with a custom frequency.
Create a new instance with a custom frequency .
tag
S
freq_in_hz
u32
tag
S
freq_in_hz
u32