mirror of
https://github.com/NicolasConstant/sengi
synced 2025-02-01 11:06:54 +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) {
|
if (timeDelta < 60) {
|
||||||
return `${timeDelta | 0}s`;
|
return `${timeDelta | 0}s`;
|
||||||
}
|
} else if (timeDelta < 60 * 60) {
|
||||||
if (timeDelta < 60 * 60) {
|
|
||||||
return `${timeDelta / 60 | 0}m`;
|
return `${timeDelta / 60 | 0}m`;
|
||||||
} else if (timeDelta < 60 * 60 * 24) {
|
} else if (timeDelta < 60 * 60 * 24) {
|
||||||
return `${timeDelta / (60 * 60)| 0}h`;
|
return `${timeDelta / (60 * 60)| 0}h`;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user