refclock: cross platform time types
This commit is contained in:
parent
bb0e721e6c
commit
a1c2e1d8cb
@ -42,8 +42,12 @@ impl ChimemonTarget for ChronySockServer {
|
|||||||
{
|
{
|
||||||
let frame = ChronyTimeReport {
|
let frame = ChronyTimeReport {
|
||||||
tv: timeval {
|
tv: timeval {
|
||||||
tv_sec: tr.system_time.timestamp(),
|
tv_sec: TryInto::<libc::time_t>::try_into(
|
||||||
tv_usec: tr.system_time.timestamp(),
|
tr.system_time.timestamp(),
|
||||||
|
)
|
||||||
|
.unwrap(),
|
||||||
|
tv_usec: tr.system_time.timestamp_subsec_micros()
|
||||||
|
as libc::suseconds_t,
|
||||||
},
|
},
|
||||||
offset: tr.offset.num_nanoseconds().unwrap() as f64 / 1e9,
|
offset: tr.offset.num_nanoseconds().unwrap() as f64 / 1e9,
|
||||||
leap: if tr.leap_flag { 1 } else { 0 },
|
leap: if tr.leap_flag { 1 } else { 0 },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user