mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 04:06:45 +01:00
transport -> clock
This commit is contained in:
parent
7f57465b3a
commit
7a4fa1692b
15 changed files with 37 additions and 36 deletions
|
|
@ -1,15 +0,0 @@
|
|||
use crate::*;
|
||||
|
||||
/// Timestamp in microseconds
|
||||
#[derive(Debug, Default)] pub struct Microsecond(AtomicF64);
|
||||
|
||||
impl_time_unit!(Microsecond);
|
||||
|
||||
impl Microsecond {
|
||||
#[inline] pub fn format_msu (&self) -> String {
|
||||
let usecs = self.get() as usize;
|
||||
let (seconds, msecs) = (usecs / 1000000, usecs / 1000 % 1000);
|
||||
let (minutes, seconds) = (seconds / 60, seconds % 60);
|
||||
format!("{minutes}:{seconds:02}:{msecs:03}")
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue