4 ms·
Won’t it be January 1, 1970?
by lukeh 4y ago
Won’t it be January 1, 1970?
- zargon 4y agoWhen a two's complement number overflows it goes to the maximum (minimum?) negative value.
- aidenn0 4y agoOf course if the timer is implemented in C as a signed number, overflow is undefined, so who knows what happens. I've not seen an embedded compiler that does anything too strange though.
- lossolo 4y agoMax int32 is 2147483647 and minimum int32 is -2147483647, if you overflow you go to the beginning of the range so to -2147483647, if you subtract 2147483647 seconds from January 1 1970 you will arrive at 13 December 1901.
- lukeh 4y agoAh, thank you.