mirror of
https://github.com/NicolasConstant/sengi
synced 2025-01-03 12:09:18 +01:00
better checks in time conversion
This commit is contained in:
parent
097d6f555a
commit
da0b013798
@ -23,8 +23,7 @@ export class StatusComponent implements OnInit {
|
||||
|
||||
if (timeDelta < 60) {
|
||||
return `${timeDelta | 0}s`;
|
||||
}
|
||||
if (timeDelta < 60 * 60) {
|
||||
} else if (timeDelta < 60 * 60) {
|
||||
return `${timeDelta / 60 | 0}m`;
|
||||
} else if (timeDelta < 60 * 60 * 24) {
|
||||
return `${timeDelta / (60 * 60)| 0}h`;
|
||||
|
Loading…
Reference in New Issue
Block a user