[Bug time/30200] time sometimes appears to go backwards

fweimer at redhat dot com sourceware-bugzilla@sourceware.org
Mon Mar 6 12:25:22 GMT 2023


https://sourceware.org/bugzilla/show_bug.cgi?id=30200

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fweimer at redhat dot com

--- Comment #7 from Florian Weimer <fweimer at redhat dot com> ---
(In reply to Adhemerval Zanella from comment #6)
> I agree that it makes sense to use the same clock for time and timespec_get,
> however, using CLOCK_REALTIME would make the vDSO optimization for x86_64
> and powerpc64 unusable (not a big deal IMHO). And another question is
> whether we will need to add a compact symbol to time (and I also do not
> think it would make sense either).

CLOCK_REALTIME still has vDSO acceleration in many cases on x86-64, right? It's
just a bit slower, and the difference can matter to some logging frameworks if
I recall correctly.

Bruno, the standard sources you cite suggest that we should round the seconds
since epoch, and not (mostly) truncate it. So the standards seem to permit such
divergence already (although the rounding it as suggested would move the less
precise timestamp forward, not backwards).

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Glibc-bugs mailing list