mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:17: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
|
@ -20,7 +20,7 @@ ErrorOr<FlatPtr> Process::sys$alarm(unsigned seconds)
|
|||
bool was_in_use = false;
|
||||
if (TimerQueue::the().cancel_timer(*timer, &was_in_use)) {
|
||||
// The timer hasn't fired. Round up the remaining time (if any)
|
||||
Time remaining = timer->remaining() + Time::from_nanoseconds(999'999'999);
|
||||
Duration remaining = timer->remaining() + Duration::from_nanoseconds(999'999'999);
|
||||
previous_alarm_remaining = remaining.to_truncated_seconds();
|
||||
}
|
||||
// We had an existing alarm, must return a non-zero value here!
|
||||
|
@ -30,7 +30,7 @@ ErrorOr<FlatPtr> Process::sys$alarm(unsigned seconds)
|
|||
|
||||
if (seconds > 0) {
|
||||
auto deadline = TimeManagement::the().current_time(CLOCK_REALTIME_COARSE);
|
||||
deadline = deadline + Time::from_seconds(seconds);
|
||||
deadline = deadline + Duration::from_seconds(seconds);
|
||||
if (!timer) {
|
||||
timer = TRY(adopt_nonnull_ref_or_enomem(new (nothrow) Timer));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue