On Tue, 02 Jun 2015 17:03:30 +0100
"Ben Avison" <[email protected]> wrote:

> If I were to make one change to gettimei() now, looking back, it would be
> to make it return int32_t instead. This is because most often you'd be
> subtracting two sample outputs of the function, and it's more often
> useful to consider time intervals as signed (say if you're comparing the
> current time against a timeout time which may be in the past or the
> future). If gettimei() returns a signed integer, then C's type promotion
> rules make the result of the subtraction signed automatically.

Wasn't overflow well-defined only for unsigned integers?

I'm also not sure if clock_t is signed or unsigned, and so does it wrap
to zero or a huge negative number.


Thanks,
pq
_______________________________________________
Pixman mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pixman

Reply via email to