mirror of
https://github.com/nikolassv/bartib
synced 2024-12-03 16:59:12 +00:00
Issue #19
Tasks that last less than 1 minute will be displayed with a duration of "<1m"
This commit is contained in:
parent
84326c6495
commit
b11c601103
1 changed files with 1 additions and 1 deletions
|
@ -10,7 +10,7 @@ pub fn format_duration(duration: &Duration) -> String {
|
||||||
if duration.num_minutes() > 0 {
|
if duration.num_minutes() > 0 {
|
||||||
duration_string.push_str(&format!("{:0>2}m", duration.num_minutes() % 60));
|
duration_string.push_str(&format!("{:0>2}m", duration.num_minutes() % 60));
|
||||||
} else {
|
} else {
|
||||||
duration_string.push_str(&format!("{}s", duration.num_seconds() % 60));
|
duration_string.push_str(&format!("<1m"));
|
||||||
}
|
}
|
||||||
|
|
||||||
duration_string
|
duration_string
|
||||||
|
|
Loading…
Reference in a new issue