MCPcopy Create free account
hub / github.com/aws/clock-bound / get

Method get

clock-bound/src/daemon/selected_clock.rs:28–35  ·  view source on GitHub ↗

Get the current clock source and its stratum Returns a tuple of (`ClockSource`, `Stratum`) representing the current state.

(&self)

Source from the content-addressed store, hash-verified

26 ///
27 /// Returns a tuple of (`ClockSource`, `Stratum`) representing the current state.
28 pub fn get(&self) -> (ClockSource, Stratum) {
29 let packed = self.source_info.load(Ordering::Relaxed);
30 let refid = (packed & 0xFFFF_FFFF) as u32;
31 let stratum =
32 Stratum::try_from(((packed >> 32) & 0xFF) as u8).unwrap_or(Stratum::Unspecified);
33
34 (Self::params_to_source(refid, stratum), stratum)
35 }
36
37 /// Get the current clock source and the stratum of this client
38 ///

Callers 5

fmtMethod · 0.45
set_and_get_roundtripFunction · 0.45
convenience_methodsFunction · 0.45

Calls

no outgoing calls

Tested by 2

convenience_methodsFunction · 0.36