Skip to content

Commit

Permalink
Upgrade statime to the latest version of the os layer libraries.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidv1992 committed Feb 21, 2024
1 parent bfaafcf commit f81523e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ fixed = "1.24"
libm = "0.2.8"
atomic_refcell = "0.1.13"

clock-steering = "0.1.0"
timestamped-socket = "0.1.0"
clock-steering = "0.2.0"
timestamped-socket = "0.2.0"


# our own crates used as dependencies, same version as the workspace version
Expand Down
2 changes: 2 additions & 0 deletions statime-linux/src/clock/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ impl LinuxClock {
// CLOCK_REALTIME timescale which is UTC, not TAI, so we need to correct
// here.
self.clock.system_offset().map(|(mut t1, t2, mut t3)| {
use clock_steering::Clock;
let tai_offset = UnixClock::CLOCK_REALTIME.get_tai().unwrap();
t1.seconds += tai_offset as libc::time_t;
t3.seconds += tai_offset as libc::time_t;
Expand All @@ -50,6 +51,7 @@ impl LinuxClock {
}

pub fn get_tai_offset(&self) -> Result<i32, clock_steering::unix::Error> {
use clock_steering::Clock;
if self.is_tai {
UnixClock::CLOCK_REALTIME.get_tai()
} else {
Expand Down

0 comments on commit f81523e

Please sign in to comment.