3 ms·
it is related to 24.5 days = 2^31 milliseconds. however it's not an overflow, it's a bug with sign extension when casting from uint32 -> int32 -> int64 -> uint6
by lacker 17y ago
it is related to 24.5 days = 2^31 milliseconds. however it's not an overflow, it's a bug with sign extension when casting from uint32 -> int32 -> int64 -> uint64, instead of directly uint32 -> uint64.
those operations are equivalent whenever the most significant bit of the uint32 is a 0, but orders of magnitude different when the most significant bit is a 1. so that explains why the bug turns off after 24.5 days and then turns back on after another 24.5 days.
if this doesn't make any sense to you, check out this wikipedia page: http://en.wikipedia.org/wiki/Sign_extension http://en.wikipedia.org/wiki/Sign_extension
the lesson is, be very careful when casting between signed and unsigned ints.