You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found at least two cases in the standard API where milliseconds are represented by u32 variables: std::sync::Condvar::wait_timeout_ms() and std::thread::park_timeout_ms(). However unlikely, it is not completely impossible for the user to expect being able to pass parameter value >= 2^32, as that value is less than 50 days. Also note that milliseconds are often passed on from another API that deals with u64 values, and so the user will likely convert the value unconditionally, without checking whether it's safe to do so.
The text was updated successfully, but these errors were encountered:
kirillkh
changed the title
milliseconds should be represented by u64, not u32 variables
milliseconds should be represented by u64, not u32 type
Sep 2, 2015
Ah yeah these are just going to be deprecated in favor of the Duration taking functions (which was the long-term plan since inception), so I'm gonna close this in favor #27771.
I found at least two cases in the standard API where milliseconds are represented by u32 variables:
std::sync::Condvar::wait_timeout_ms()
andstd::thread::park_timeout_ms()
. However unlikely, it is not completely impossible for the user to expect being able to pass parameter value >= 2^32, as that value is less than 50 days. Also note that milliseconds are often passed on from another API that deals with u64 values, and so the user will likely convert the value unconditionally, without checking whether it's safe to do so.The text was updated successfully, but these errors were encountered: