summaryrefslogtreecommitdiff
path: root/libc/src/time/linux/timespec_get.cpp
AgeCommit message (Collapse)Author
2025-11-11[libc][POSIX] Add clock_settime() function for Linux (#161729)Anton Shepelev
Closes #161461 - This is my first time contributing to libc's POSIX, so for reference I used `clock_gettime` implementation for Linux. For convenience, here is the description of `clock_settime` function [behavior](https://www.man7.org/linux/man-pages/man3/clock_settime.3.html)
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-12-02[libc] Implement `timespec_get` (#116102)Petr Hosek
`timespec_get` is C standard counterpart to POSIX `clock_gettime`. On Linux we simply use `clock_gettime`. On baremetal we introduce a new external API `__llvm_libc_timespec_get_utc` that should be implemented by the vendor.