mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:47:45 +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
|
@ -164,11 +164,11 @@ public:
|
|||
|
||||
static void timer_tick(RegisterState const& regs)
|
||||
{
|
||||
static Time last_wakeup;
|
||||
static Duration last_wakeup;
|
||||
auto now = kgettimeofday();
|
||||
constexpr auto ideal_interval = Time::from_microseconds(1000'000 / OPTIMAL_PROFILE_TICKS_PER_SECOND_RATE);
|
||||
constexpr auto ideal_interval = Duration::from_microseconds(1000'000 / OPTIMAL_PROFILE_TICKS_PER_SECOND_RATE);
|
||||
auto expected_wakeup = last_wakeup + ideal_interval;
|
||||
auto delay = (now > expected_wakeup) ? now - expected_wakeup : Time::from_microseconds(0);
|
||||
auto delay = (now > expected_wakeup) ? now - expected_wakeup : Duration::from_microseconds(0);
|
||||
last_wakeup = now;
|
||||
auto* current_thread = Thread::current();
|
||||
// FIXME: We currently don't collect samples while idle.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue