mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-11 06:06:45 +01:00
use Arc<str> where applicable; use konst split_at
This commit is contained in:
parent
411fc0c4bc
commit
305481adee
35 changed files with 286 additions and 273 deletions
|
|
@ -6,10 +6,10 @@ use crate::*;
|
|||
impl_time_unit!(Microsecond);
|
||||
|
||||
impl Microsecond {
|
||||
#[inline] pub fn format_msu (&self) -> String {
|
||||
#[inline] pub fn format_msu (&self) -> Arc<str> {
|
||||
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}")
|
||||
format!("{minutes}:{seconds:02}:{msecs:03}").into()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue