[Pixman] RFC: Pixman benchmark CPU time measurement
Pekka Paalanen
ppaalanen at gmail.com
Wed Jun 3 00:40:37 PDT 2015
On Tue, 02 Jun 2015 17:03:30 +0100
"Ben Avison" <bavison at riscosopen.org> 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
More information about the Pixman
mailing list