mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-17 08:40:52 +00:00
fix utctimems to match std
This commit is contained in:
parent
a48992c709
commit
e0e908dbf4
1 changed files with 4 additions and 2 deletions
|
|
@ -321,9 +321,10 @@ pub fn start_time_server() {
|
||||||
start_rtc_secs as i64 * 1000i64
|
start_rtc_secs as i64 * 1000i64
|
||||||
+ (tt.elapsed_ms() - start_tt_ms) as i64;
|
+ (tt.elapsed_ms() - start_tt_ms) as i64;
|
||||||
log::debug!("hw only UTC ms {}", t);
|
log::debug!("hw only UTC ms {}", t);
|
||||||
|
// NOTE: endian swap for compatibility with `std`
|
||||||
xous::return_scalar2(msg.sender,
|
xous::return_scalar2(msg.sender,
|
||||||
(((t as u64) >> 32) & 0xFFFF_FFFF) as usize,
|
|
||||||
(t as u64 & 0xFFFF_FFFF) as usize,
|
(t as u64 & 0xFFFF_FFFF) as usize,
|
||||||
|
(((t as u64) >> 32) & 0xFFFF_FFFF) as usize,
|
||||||
).expect("couldn't respond to GetUtcTimeMs");
|
).expect("couldn't respond to GetUtcTimeMs");
|
||||||
}),
|
}),
|
||||||
Some(TimeOp::GetLocalTimeMs) => xous::msg_blocking_scalar_unpack!(msg, _, _, _, _, {
|
Some(TimeOp::GetLocalTimeMs) => xous::msg_blocking_scalar_unpack!(msg, _, _, _, _, {
|
||||||
|
|
@ -398,9 +399,10 @@ pub fn start_time_server() {
|
||||||
utc_offset_ms = 0;
|
utc_offset_ms = 0;
|
||||||
}
|
}
|
||||||
log::trace!("utc ms {}", t);
|
log::trace!("utc ms {}", t);
|
||||||
|
// NOTE: endian swap for compatibility with `std`
|
||||||
xous::return_scalar2(msg.sender,
|
xous::return_scalar2(msg.sender,
|
||||||
(((t as u64) >> 32) & 0xFFFF_FFFF) as usize,
|
|
||||||
(t as u64 & 0xFFFF_FFFF) as usize,
|
(t as u64 & 0xFFFF_FFFF) as usize,
|
||||||
|
(((t as u64) >> 32) & 0xFFFF_FFFF) as usize,
|
||||||
).expect("couldn't respond to GetUtcTimeMs");
|
).expect("couldn't respond to GetUtcTimeMs");
|
||||||
}),
|
}),
|
||||||
Some(TimeOp::GetLocalTimeMs) => xous::msg_blocking_scalar_unpack!(msg, _, _, _, _, {
|
Some(TimeOp::GetLocalTimeMs) => xous::msg_blocking_scalar_unpack!(msg, _, _, _, _, {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue