4 ms·
The Matter of Time()
- ddtaylor 7y ago> long t1 = System.currentTimeMillis(); > > isThisPossible(t1 < 0); > 5) No, it's not possible, at least something is not possible Well, maybe not any time soon, but eventually (in Java at least) that will wrap around and therefor it's possible.
- xhgdvjky 7y agoidk anything about Java but I imagine the spec could define this to be positive
- LeifCarrotson 7y agoIf the spec was going to define it to be positive, the function would not return 'long', it would be unsigned long, right?
- arnsholt 7y agoJava doesn't have unsigned integer types (except byte IIRC), so signed long is your only option. OTOH the bitwise ops are specced to operate as if they operated on twos complement represented signed integers, so you can at least do that kind of stuff if you need to, on the full 64 bits.
- ddtaylor 7y agobyte is signed, just FYI
- deleted 7y ago[deleted]