diff --git a/src/tiles/internet_time.rs b/src/tiles/internet_time.rs index d4a3d3d..f60070e 100644 --- a/src/tiles/internet_time.rs +++ b/src/tiles/internet_time.rs @@ -19,8 +19,10 @@ pub async fn internet_time_stream(config: InternetTimeConfig) { let internet_time = seconds / 86.4; yield Ok(Block { full_text: format!( - "@{time:03.prec$}", + "@{time:0width$.prec$}", time = internet_time, + // 3 digits + and decimal point + width = config.precision as usize + 4, prec = config.precision as usize ) .into_boxed_str(),