mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 19:17:58 +00:00
cli: fix milliseconds formatting on logs (#5507)
This commit is contained in:
@@ -186,8 +186,8 @@ pub fn init_logger(pattern: &str) {
|
||||
let name = ::std::thread::current()
|
||||
.name()
|
||||
.map_or_else(Default::default, |x| format!("{}", Colour::Blue.bold().paint(x)));
|
||||
let millis = (now.tm_nsec as f32 / 1000000.0).round() as usize;
|
||||
let timestamp = format!("{}.{:03}", timestamp, millis);
|
||||
let millis = (now.tm_nsec as f32 / 1000000.0).floor() as usize;
|
||||
let timestamp = format!("{}.{}", timestamp, millis);
|
||||
format!(
|
||||
"{} {} {} {} {}",
|
||||
Colour::Black.bold().paint(timestamp),
|
||||
|
||||
Reference in New Issue
Block a user