[chg] reduce nr of decimal places to 6 (microseconds resolution)

nanoseconds is for almost all purposes (TTY) too much and not needed.
This commit is contained in:
ddidderr 2022-08-12 11:55:38 +02:00
parent b99f27935b
commit 6acd42ecc2
Signed by: ddidderr
GPG Key ID: 3841F1C27E6F0E14

View File

@ -20,14 +20,14 @@ fn print_time<T>(output: &mut T) -> LogtimesResult
where where
T: Write, T: Write,
{ {
let date_now = Local::now().format("%H:%M:%S%.9f"); let date_now = Local::now().format("%H:%M:%S%.6f");
write!(output, "[{}] ", &date_now) write!(output, "[{}] ", &date_now)
} }
#[inline(always)] #[inline(always)]
fn print_time_color(output: &mut StdoutLock) -> Result<(), std::io::Error> { fn print_time_color(output: &mut StdoutLock) -> Result<(), std::io::Error> {
let date_now = Local::now().format("%H:%M:%S%.9f"); let date_now = Local::now().format("%H:%M:%S%.6f");
let color_green = "\x1b\x5b\x30\x3b\x33\x32\x6d"; let color_green = "\x1b\x5b\x30\x3b\x33\x32\x6d";
let color_off = "\x1b\x5b\x30\x6d"; let color_off = "\x1b\x5b\x30\x6d";