Mir

Code review comment for lp:~vanvugt/mir/posix-timestamp-or-equal

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Technically correct, but I think that's being slightly too pedantic.

The whole point of PosixTimestamp is that the choice of clock is not known till run time. It's specified by the graphics driver actually. So you can't "remove" the operations as much as say "if (clock_id == CLOCK_REALTIME) throw".

And actually even if you were using CLOCK_REALTIME, having comparison operators that work numerically is still required. So "removing" or throwing in that case is unacceptable. The caller should just be aware that some clocks are not always monotonic and design their algorithm accordingly...

« Back to merge proposal