Is there something wrong in particular for using built-in fixed-point types for timestamps?
Yes, overflow/underflow issues and yada yada, but virtually every type can be mised in its own way.
Yes, overflow/underflow issues and yada yada, but virtually every type can be mised in its own way.
Imagine how many millions of hours of coder time could have been saved if the C specification included fixedpoint<20,12> (or however you wanna write it), and thus would have created a single standard implementation for all of them. Having not just basic arithmetics, but decent sin, cos, sqrt, atan2 etc, all parth of cmath. The difference now would be minor with soft float beeing ubiquitous, but back when it was faster... Damn.
Many languages support these in their standard libraries. (Eg Python does.)
They are a bit slow compared to ints or floats, but good for precision.