Standard Abbreviated Duration Strings
There are several places in the router web console where a "Duration" value is rendered to the user.
- In the sidebar, Router Uptime is often presented as "72 hours" or "10 days"
- On the
/peers
screen durations are used to describe how long a connection has been idle for and how long it has been up. Here time is presented as "20 sec", "1517 ms" or "12 hours". - On `/tunnelsparticipating' screen a duration value is used to show when a tunnel will expire.
It is not necessary to spell out "72 hours". "72h" is short and just as informative. It is not necessary to spell out "20 sec". "20s" is shorter and just as informative. It is not necessary to spell out "12 hours". "12h" is shorter and just as informative.
When the router console needs to display a Duration value it should use abbreviations:
2y - 2 years 3m - 3 months 4d - 4 days 1h - 1 hour 5m - 5 minutes 6s - 6 seconds 1024ms - 1024 milliseconds.
These abbreviations can be combined to express durations of higher precession:
3m21d7h - 3 months, 21 days, 7 hour.
These abbreviations should be used wherever the browser needs to specify a duration string to the user.