diff options
author | James Ross <git@james-ross.co.uk> | 2020-04-22 10:46:07 +0200 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2020-04-22 10:46:07 +0200 |
commit | 37a8affbd319209fd0d0d96ee4e3002c8ecc5076 (patch) | |
tree | 30e61d0265aa21e4d914cae8e1a482e4389a8879 /docs/src | |
parent | f52786b4badf82e1bfad06b52ade0397b61cd14e (diff) | |
download | libuv-37a8affbd319209fd0d0d96ee4e3002c8ecc5076.tar.gz libuv-37a8affbd319209fd0d0d96ee4e3002c8ecc5076.zip |
linux: make cpu_times consistently be milliseconds
On Linux, cpu_times have been calculated differently to all other
platforms for a while. Other platforms (FreeBSD, Mac, Windows) are all
in milliseconds, but Linux has been returning values ten times larger.
libuv has not previously documented what unit cpu_times uses, even
though NodeJS did - as milliseconds.
Here we're both documenting that the cpu_times are indeed in
milliseconds, and fixing the inconsistency on Linux.
Fixes: https://github.com/libuv/libuv/issues/2773
PR-URL: https://github.com/libuv/libuv/pull/2796
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'docs/src')
-rw-r--r-- | docs/src/misc.rst | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/src/misc.rst b/docs/src/misc.rst index 8515cdbc..7640b8b0 100644 --- a/docs/src/misc.rst +++ b/docs/src/misc.rst @@ -131,11 +131,11 @@ Data types char* model; int speed; struct uv_cpu_times_s { - uint64_t user; - uint64_t nice; - uint64_t sys; - uint64_t idle; - uint64_t irq; + uint64_t user; /* milliseconds */ + uint64_t nice; /* milliseconds */ + uint64_t sys; /* milliseconds */ + uint64_t idle; /* milliseconds */ + uint64_t irq; /* milliseconds */ } cpu_times; } uv_cpu_info_t; |