diff options
author | Derek Mauro <dmauro@google.com> | 2023-02-09 19:45:05 -0800 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-02-09 19:45:48 -0800 |
commit | fa4855403cdfb91b9c16f792041258ed819594c1 (patch) | |
tree | 49546e9be6ce6fafbc78e4120b8ad51de386fdf3 /absl/synchronization/CMakeLists.txt | |
parent | 823b837839db2a754af37095c72f97ce6733d32b (diff) | |
download | abseil-fa4855403cdfb91b9c16f792041258ed819594c1.tar.gz abseil-fa4855403cdfb91b9c16f792041258ed819594c1.tar.bz2 abseil-fa4855403cdfb91b9c16f792041258ed819594c1.zip |
Rewrite KernelTimeout to support both absolute and relative timeouts
APIs that take KernelTimeout as a parameter can now query if an
absolute or relative timeout was requested. If the underlying API can
only use one type of timeout, the code will do a reasonable
conversion.
The goal is to eventually enable the possibility of using wait times
that are based on monotonic clocks that are safe against system clock
steps.
PiperOrigin-RevId: 508541507
Change-Id: Id08bf13515f3e1bfd78d88393cde98a6fd3ef72c
Diffstat (limited to 'absl/synchronization/CMakeLists.txt')
-rw-r--r-- | absl/synchronization/CMakeLists.txt | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/absl/synchronization/CMakeLists.txt b/absl/synchronization/CMakeLists.txt index f64653bb..5eb9b566 100644 --- a/absl/synchronization/CMakeLists.txt +++ b/absl/synchronization/CMakeLists.txt @@ -39,14 +39,30 @@ absl_cc_library( kernel_timeout_internal HDRS "internal/kernel_timeout.h" + SRCS + "internal/kernel_timeout.cc" COPTS ${ABSL_DEFAULT_COPTS} DEPS - absl::core_headers + absl::config absl::raw_logging_internal absl::time ) +absl_cc_test( + NAME + kernel_timeout_internal_test + SRCS + "internal/kernel_timeout_test.cc" + COPTS + ${ABSL_TEST_COPTS} + DEPS + absl::kernel_timeout_internal + absl::config + absl::time + GTest::gmock_main +) + absl_cc_library( NAME synchronization |