This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Fix clock selection in chrono.cpp and filesystem_clock.cpp
ClosedPublic

Authored by ldionne on Jul 11 2023, 3:09 PM.

Details

Summary

This patch partly reverts the change that was made in 5f1ba3a502
regarding the clock selection on Apple platforms. It turns out that
gettimeofday() is marked as obsolete by POSIX and clock_gettime() is
recommended instead. Since both are equivalent for our purposes,
prefer using clock_gettime() even on Apple platforms.

Diff Detail

Event Timeline

ldionne created this revision.Jul 11 2023, 3:09 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 11 2023, 3:09 PM
ldionne requested review of this revision.Jul 11 2023, 3:09 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 11 2023, 3:09 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
ldionne accepted this revision.Jul 12 2023, 1:31 PM

Back-deployment failures are known flukes unrelated to this patch.

This revision is now accepted and ready to land.Jul 12 2023, 1:31 PM
This revision was landed with ongoing or failed builds.Jul 12 2023, 3:07 PM
This revision was automatically updated to reflect the committed changes.