summaryrefslogtreecommitdiff
path: root/libc/src/time/linux/clock_gettime.cpp
AgeCommit message (Collapse)Author
2025-06-11[libc] Move libc_errno.h to libc/src/__support and make ↵lntue
LIBC_ERRNO_MODE_SYSTEM to be header-only. (#143187) This is the first step in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2024-12-05Reapply "[libc][windows] start time API implementation (#117775)" (#118886)Schrodinger ZHU Yifan
2024-12-05Revert "[libc][windows] start time API implementation (#117775)"Joseph Huber
This reverts commit 0adff0af20c7d9bae8bd8bdf402506c10369ead1. Breaks the GPU build
2024-12-05[libc][windows] start time API implementation (#117775)Schrodinger ZHU Yifan
Add a `clock_gettime` emulation layer and use it to implement the `time` entrypoint. For windows, the monotonic clock is emulated using `QPC`. The realtime clock is emulated using `GetSystemTimePreciseAsFileTime`.
2024-07-12[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597)Petr Hosek
This is a part of #97655.
2024-07-12Revert "[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace ↵Mehdi Amini
declaration" (#98593) Reverts llvm/llvm-project#98075 bots are broken
2024-07-11[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98075)Petr Hosek
This is a part of #97655.
2024-05-10Reland "[libc][NFC] adjust time related implementations"" (#91687)Schrodinger ZHU Yifan
Reverts llvm/llvm-project#91657 and Relands #91485
2024-05-09Revert "[libc][NFC] adjust time related implementations" (#91657)Schrodinger ZHU Yifan
Reverts llvm/llvm-project#91485. It breaks GPU and fuchisa.
2024-05-09[libc][NFC] adjust time related implementations (#91485)Schrodinger ZHU Yifan
2023-09-26[libc] Mass replace enclosing namespace (#67032)Guillaume Chatelet
This is step 4 of https://discourse.llvm.org/t/rfc-customizable-namespace-to-allow-testing-the-libc-when-the-system-libc-is-also-llvms-libc/73079
2023-09-08[libc] Unify gettime implementations (#65383)Mikhail R. Gadelha
Similar to D159208, this patch unifies the calls to a syscall, in this patch it is the syscall SYS_clock_gettime/SYS_clock_gettime64. This patch also fixes calls to SYS_clock_gettime64 by creating a timespec64 object, passing it to the syscall and rewriting the timespec given by the caller with timespec64 object's contents. This fixes cases where timespec has a 4 bytes long time_t member, but SYS_clock_gettime is not available (e.g., rv32).