mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:14:58 +00:00
AK: Remove Duration::now_monotonic
This is the end of absolute time support in Duration. :^)
This commit is contained in:
parent
fc5cab5c21
commit
3c212c8535
2 changed files with 0 additions and 15 deletions
10
AK/Time.cpp
10
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()
|
MonotonicTime MonotonicTime::now()
|
||||||
{
|
{
|
||||||
return MonotonicTime { now_time_from_clock(CLOCK_MONOTONIC) };
|
return MonotonicTime { now_time_from_clock(CLOCK_MONOTONIC) };
|
||||||
|
|
|
@ -222,11 +222,6 @@ public:
|
||||||
[[nodiscard]] constexpr static Duration zero() { return Duration(0, 0); };
|
[[nodiscard]] constexpr static Duration zero() { return Duration(0, 0); };
|
||||||
[[nodiscard]] constexpr static Duration max() { return Duration(__INT64_MAX__, 999'999'999); };
|
[[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).
|
// Truncates towards zero (2.8s to 2s, -2.8s to -2s).
|
||||||
[[nodiscard]] i64 to_truncated_seconds() const;
|
[[nodiscard]] i64 to_truncated_seconds() const;
|
||||||
[[nodiscard]] i64 to_truncated_milliseconds() const;
|
[[nodiscard]] i64 to_truncated_milliseconds() const;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue