| 341 | #[repr(C)] |
| 342 | #[derive(Debug, Copy, Clone, PartialEq)] |
| 343 | pub struct ClockErrorBoundV2 { |
| 344 | /// The `CLOCK_MONOTONIC_COARSE` timestamp recorded when the bound on clock error was |
| 345 | /// calculated. The current implementation relies on Chrony tracking data, which accounts for |
| 346 | /// the dispersion between the last clock processing event, and the reading of tracking data. |
| 347 | as_of: TimeSpec, |
| 348 | |
| 349 | /// The `CLOCK_MONOTONIC_COARSE` timestamp beyond which the bound on clock error should not be |
| 350 | /// trusted. This is a useful signal that the communication with the synchronization daemon is |
| 351 | /// has failed, for example. |
| 352 | void_after: TimeSpec, |
| 353 | |
| 354 | /// An absolute upper bound on the accuracy of the `CLOCK_REALTIME` clock with regards to true |
| 355 | /// time at the instant represented by `as_of`. |
| 356 | bound_nsec: i64, |
| 357 | |
| 358 | /// Disruption marker. |
| 359 | /// |
| 360 | /// This value is incremented (by an unspecified delta) each time the clock has been disrupted. |
| 361 | /// This count value is specific to a particular VM/EC2 instance. |
| 362 | disruption_marker: u64, |
| 363 | |
| 364 | /// Maximum drift rate of the clock between updates of the synchronization daemon. The value |
| 365 | /// stored in `bound_nsec` should increase by the following to account for the clock drift |
| 366 | /// since `bound_nsec` was computed: |
| 367 | /// `bound_nsec += max_drift_ppb * (now - as_of)` |
| 368 | max_drift_ppb: u32, |
| 369 | |
| 370 | /// The synchronization daemon status indicates whether the daemon is synchronized, |
| 371 | /// free-running, etc. |
| 372 | clock_status: ClockStatus, |
| 373 | |
| 374 | /// Clock disruption support enabled flag. |
| 375 | /// |
| 376 | /// This indicates whether or not the ClockBound daemon was started with a |
| 377 | /// configuration that supports detecting clock disruptions. |
| 378 | clock_disruption_support_enabled: bool, |
| 379 | |
| 380 | /// Padding. |
| 381 | _padding: [u8; 7], |
| 382 | } |
| 383 | |
| 384 | impl ClockErrorBoundV2 { |
| 385 | /// Create a new `ClockErrorBound` struct. |
nothing calls this directly
no outgoing calls
no test coverage detected