diff options
author | Lukas Larsson <[email protected]> | 2018-05-15 16:32:26 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2018-05-15 16:36:48 +0200 |
commit | d5dc5584884488c8fcb5710997a14c2c418692f3 (patch) | |
tree | 1058b4ef8953d6b814d898b890873ae2627a16d3 /erts/emulator/beam/erl_time_sup.c | |
parent | 3b3e2f46841e3e86c991be92d62cbb0360ca80e3 (diff) | |
download | otp-d5dc5584884488c8fcb5710997a14c2c418692f3.tar.gz otp-d5dc5584884488c8fcb5710997a14c2c418692f3.tar.bz2 otp-d5dc5584884488c8fcb5710997a14c2c418692f3.zip |
erts: Make cpu_timestamp use per thread on Linux
If we don't use per thread the value becomes completely
nonsensical on systems with more than one scheduler.
We keep the old solaris behaviour in order to support the
option, but it only really works when using a single
scheduler.
Diffstat (limited to 'erts/emulator/beam/erl_time_sup.c')
-rw-r--r-- | erts/emulator/beam/erl_time_sup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_time_sup.c b/erts/emulator/beam/erl_time_sup.c index 4f91d9ad07..29c698e34f 100644 --- a/erts/emulator/beam/erl_time_sup.c +++ b/erts/emulator/beam/erl_time_sup.c @@ -1860,7 +1860,7 @@ void erts_get_now_cpu(Uint* megasec, Uint* sec, Uint* microsec) { SysCpuTime t; SysTimespec tp; - sys_get_proc_cputime(t, tp); + sys_get_cputime(t, tp); *microsec = (Uint)(tp.tv_nsec / 1000); t = (tp.tv_sec / 1000000); *megasec = (Uint)(t % 1000000); |