mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:57:35 +00:00
AK: Rename Time to Duration
That's what this class really is; in fact that's what the first line of the comment says it is. This commit does not rename the main files, since those will contain other time-related classes in a little bit.
This commit is contained in:
parent
82ddc813d5
commit
213025f210
140 changed files with 634 additions and 628 deletions
|
@ -41,18 +41,18 @@ public:
|
|||
static u64 scheduler_current_time();
|
||||
|
||||
static ErrorOr<void> validate_clock_id(clockid_t);
|
||||
Time current_time(clockid_t) const;
|
||||
Time monotonic_time(TimePrecision = TimePrecision::Coarse) const;
|
||||
Time monotonic_time_raw() const
|
||||
Duration current_time(clockid_t) const;
|
||||
Duration monotonic_time(TimePrecision = TimePrecision::Coarse) const;
|
||||
Duration monotonic_time_raw() const
|
||||
{
|
||||
// TODO: implement
|
||||
return monotonic_time(TimePrecision::Precise);
|
||||
}
|
||||
Time epoch_time(TimePrecision = TimePrecision::Precise) const;
|
||||
void set_epoch_time(Time);
|
||||
Duration epoch_time(TimePrecision = TimePrecision::Precise) const;
|
||||
void set_epoch_time(Duration);
|
||||
time_t ticks_per_second() const;
|
||||
static Time boot_time();
|
||||
Time clock_resolution() const;
|
||||
static Duration boot_time();
|
||||
Duration clock_resolution() const;
|
||||
|
||||
bool is_system_timer(HardwareTimerBase const&) const;
|
||||
|
||||
|
@ -64,12 +64,12 @@ public:
|
|||
bool disable_profile_timer();
|
||||
|
||||
u64 uptime_ms() const;
|
||||
static Time now();
|
||||
static Duration now();
|
||||
|
||||
// FIXME: Should use AK::Time internally
|
||||
// FIXME: Should use AK::Duration internally
|
||||
// FIXME: Also, most likely broken, because it does not check m_update[12] for in-progress updates.
|
||||
timespec remaining_epoch_time_adjustment() const { return m_remaining_epoch_time_adjustment; }
|
||||
// FIXME: Should use AK::Time internally
|
||||
// FIXME: Should use AK::Duration internally
|
||||
// FIXME: Also, most likely broken, because it does not check m_update[12] for in-progress updates.
|
||||
void set_remaining_epoch_time_adjustment(timespec const& adjustment) { m_remaining_epoch_time_adjustment = adjustment; }
|
||||
|
||||
|
@ -102,7 +102,7 @@ private:
|
|||
Atomic<u32> m_update1 { 0 };
|
||||
u32 m_ticks_this_second { 0 };
|
||||
u64 m_seconds_since_boot { 0 };
|
||||
// FIXME: Should use AK::Time internally
|
||||
// FIXME: Should use AK::Duration internally
|
||||
timespec m_epoch_time { 0, 0 };
|
||||
timespec m_remaining_epoch_time_adjustment { 0, 0 };
|
||||
Atomic<u32> m_update2 { 0 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue