Commit 27f7083
committed
Format TTL for humans
When viewing details of events with a long TTL, it is not
straightforward to check if it is about to expire or not.
Instead of displayer the raw TTL as a number of seconds, format it by
using an appropriate unit of time and fixed precision:
* 42 => "42 seconds"
* 420 => "7.0 minutes"
* 4200 => "70.0 minutes"
* 42000 => "11.7 hours"
* 420000 => "4.9 days"1 parent bd08359 commit 27f7083
1 file changed
+15
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
3 | 17 | | |
4 | 18 | | |
5 | 19 | | |
| |||
11 | 25 | | |
12 | 26 | | |
13 | 27 | | |
14 | | - | |
| 28 | + | |
15 | 29 | | |
16 | 30 | | |
17 | 31 | | |
| |||
0 commit comments