From 3c212c8535f6964054122c1b75b36f737a5d6188 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?kleines=20Filmr=C3=B6llchen?= Date: Fri, 17 Mar 2023 19:51:33 +0100 Subject: [PATCH] AK: Remove Duration::now_monotonic This is the end of absolute time support in Duration. :^) --- AK/Time.cpp | 10 ---------- AK/Time.h | 5 ----- 2 files changed, 15 deletions(-) diff --git a/AK/Time.cpp b/AK/Time.cpp index 5fb62691b6..e869b515f9 100644 --- a/AK/Time.cpp +++ b/AK/Time.cpp @@ -217,16 +217,6 @@ static Duration now_time_from_clock(clockid_t clock_id) } } -Duration Duration::now_monotonic() -{ - return now_time_from_clock(CLOCK_MONOTONIC); -} - -Duration Duration::now_monotonic_coarse() -{ - return now_time_from_clock(CLOCK_MONOTONIC_COARSE); -} - MonotonicTime MonotonicTime::now() { return MonotonicTime { now_time_from_clock(CLOCK_MONOTONIC) }; diff --git a/AK/Time.h b/AK/Time.h index 87709fe052..ec3654fbb4 100644 --- a/AK/Time.h +++ b/AK/Time.h @@ -222,11 +222,6 @@ public: [[nodiscard]] constexpr static Duration zero() { return Duration(0, 0); }; [[nodiscard]] constexpr static Duration max() { return Duration(__INT64_MAX__, 999'999'999); }; -#ifndef KERNEL - [[nodiscard]] static Duration now_monotonic(); - [[nodiscard]] static Duration now_monotonic_coarse(); -#endif - // Truncates towards zero (2.8s to 2s, -2.8s to -2s). [[nodiscard]] i64 to_truncated_seconds() const; [[nodiscard]] i64 to_truncated_milliseconds() const;