[PATCH xserver 2/4] os: Use separate clockid for GetTimeInMicros()

Keith Packard keithp at keithp.com
Wed Dec 27 19:26:10 UTC 2017


Jeff Smith <whydoubt at gmail.com> writes:

> Prior to commit a779fda2 (xwayland: Use the CLOCK_MONOTONIC clock),
> GetTimeInMillis() and GetTimeInMicros() had separate clockid's.  As a
> part of making them available to ForceClockId(), that commit replaced
> them with a single clockid, whose value depended on which GetTime
> function got called first.

Hrm. I would think that it would be good to have both paths always
select the same clock; is there some reason we can't have
GetTimeInMillis just call GetTimeInMicros and divide by 1000?

I think the only reason for prefering milliseconds is that it's easier
on 32-bit hardware, yes?

-- 
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20171227/fc69bf57/attachment.sig>


More information about the xorg-devel mailing list