diff options
author | Patrik Nyblom <[email protected]> | 2013-06-05 15:30:22 +0200 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2013-06-05 15:30:22 +0200 |
commit | eedd89fcb0b892117b798b8b097cf63b9ab59db7 (patch) | |
tree | f9dfcca0ea758fca35f6f94b98c4b013ac255103 /erts/emulator/beam/utils.c | |
parent | 620b7e879c9943e1e79990ed0a825228f7b18b04 (diff) | |
parent | eb4d4c133a8c2ad00807888289cb99d67f70896f (diff) | |
download | otp-eedd89fcb0b892117b798b8b097cf63b9ab59db7.tar.gz otp-eedd89fcb0b892117b798b8b097cf63b9ab59db7.tar.bz2 otp-eedd89fcb0b892117b798b8b097cf63b9ab59db7.zip |
Merge branch 'pan/r16b01/system_monitor_long_schedule/OTP-11067' into maint
* pan/r16b01/system_monitor_long_schedule/OTP-11067:
Minor spelling correction
Add system_monitor of long_schedule
Diffstat (limited to 'erts/emulator/beam/utils.c')
-rw-r--r-- | erts/emulator/beam/utils.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/erts/emulator/beam/utils.c b/erts/emulator/beam/utils.c index d5d97d748a..0a833f7e66 100644 --- a/erts/emulator/beam/utils.c +++ b/erts/emulator/beam/utils.c @@ -3722,6 +3722,24 @@ erts_smp_ensure_later_interval_acqb(erts_interval_t *icp, Uint64 ic) } +/* + * A millisecond timestamp without time correction where there's no hrtime + * - for tracing on "long" things... + */ +Uint64 erts_timestamp_millis(void) +{ +#ifdef HAVE_GETHRTIME + return (Uint64) (sys_gethrtime() / 1000000); +#else + Uint64 res; + SysTimeval tv; + sys_gettimeofday(&tv); + res = (Uint64) tv.tv_sec*1000000; + res += (Uint64) tv.tv_usec; + return (res / 1000); +#endif +} + #ifdef DEBUG /* * Handy functions when using a debugger - don't use in the code! |