otp
otp copied to clipboard
erlang:monotonic_time(native) invalid
Describe the bug
Documentation of erlang:monotonic_time/1 says that argument must be of type erlang:time_unit() which includes native
, but native
is not allowed.
To Reproduce
17> erlang:monotonic_time(second).
-576460358
18> erlang:monotonic_time(native).
** exception error: bad argument
in function erlang:monotonic_time/1
called as erlang:monotonic_time(native)
*** argument 1: invalid time unit
Expected behavior
Either documentation or function is wrong. I would expect native
argument to return erlang:monotonic_time/0
value ?
Affected versions 24.3 and 25 at least.
Thanks for the bug report! I've made a fix in the #6213 PR (not very well tested yet). The fix will be part of the next patch unless something unexpected happens.
Fixed in patches OTP 25.0.4 and OTP 24.3.4.3 which we released today.