Skip to content

Commit

Permalink
DeadlineManager: make sure next notification is at least kResolution …
Browse files Browse the repository at this point in the history
…away

PiperOrigin-RevId: 707435082
Change-Id: Ia9dfdaa808d3a406e047ff18590b47a1ce5b2a18
  • Loading branch information
happyCoder92 authored and copybara-github committed Dec 18, 2024
1 parent a545f8d commit 953d754
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sandboxed_api/sandbox2/util/deadline_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ void DeadlineManager::Run() {
next_deadline)) {
continue;
}
absl::Time next_notification_time = RoundUpTo(absl::Now(), kResolution);
absl::Time next_notification_time =
RoundUpTo(absl::Now() + kResolution, kResolution);
while (!queue_.empty() && (*queue_.begin())->deadline <= next_deadline) {
DeadlineRegistration::Data* entry = *queue_.begin();
queue_.erase(queue_.begin());
Expand Down

0 comments on commit 953d754

Please sign in to comment.