sat-rs/satrs-minisim/src/time.rs
Robin Mueller ae8e39f626
Some checks are pending
Rust/sat-rs/pipeline/pr-main Build queued...
First version of asynchronix based mini simulator
- Basic simulator with 3 devices
- Can be driven via a UDP interface
- Design allows to drive the simulation via different interface in the future
  by using Request/Reply messaging.
2024-03-09 15:11:11 +01:00

6 lines
171 B
Rust

use asynchronix::time::MonotonicTime;
pub fn current_millis(time: MonotonicTime) -> u64 {
(time.as_secs() as u64 * 1000) + (time.subsec_nanos() as u64 / 1_000_000)
}