diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-06-11 19:24:12 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-06-12 02:32:42 -0600 |
commit | 2fb446c886c4f4d6750abf4778cdff4775786f9a (patch) | |
tree | 57d6996c0f6b9f270b356da72fe48f7a2304fe77 /cmd/sbc_harness/static | |
parent | 1b8f5bb90d9d6e4e34b95d9e9b88638c9ffca4ac (diff) |
/harness/uptime.txt: Add a human-readable form
Diffstat (limited to 'cmd/sbc_harness/static')
-rw-r--r-- | cmd/sbc_harness/static/Documentation/harness_uptime_txt.txt | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/cmd/sbc_harness/static/Documentation/harness_uptime_txt.txt b/cmd/sbc_harness/static/Documentation/harness_uptime_txt.txt index 1ab86f7..09e9243 100644 --- a/cmd/sbc_harness/static/Documentation/harness_uptime_txt.txt +++ b/cmd/sbc_harness/static/Documentation/harness_uptime_txt.txt @@ -3,14 +3,24 @@ NAME DESCRIPTION Reading this file gives a text string of the format - `sprintf("%uns\n", uptime_ns)` indicating the harness's uptime - in an integer number of nanoseconds. + + {ns}ns + [[[[{y}y]{d}d ]{h}h]{m}m]{s.09}s + + That is: the first line is simply the harness's uptime in an + integer number of nanoseconds; and the second line is this + same number in a more human-readable form; divided into + seconds, minutes, hours, days, and years. BUGS - Using nanoseconds gives the illusion of more precision than - there actually is; the harness' clock only has microsecond - resolution; the last 3 digits of the returned nanosecond count - will always be 0. + - Using nanoseconds gives the illusion of more precision than + there actually is; the harness' clock only has microsecond + resolution; the last 3 digits of the returned nanosecond + count will always be 0. + + - In the human-readable form, the days are always exactly + 60*60*24 seconds (leap seconds are ignored), and the years + are always exactly 365 days (leap years are ignored). AUTHOR Copyright (C) 2025 Luke T. Shumaker <lukeshu@lukeshu.com> |