[roll] Roll fuchsia [rust][timers] Centralize zircon timer management logic.
Refactor the timer code just a bit in order to centralize the
underlying zircon timer management code.
The main goal here is to simplify some of the logic which previously
had to be distributed over this file. The invariants we are
attempting to hold are:
1) Any time the timer queue has no members, the zircon timer should be
canceled (eg, have no active timeout).
2) Any time the timer queue has any members, the zircon timer's
deadline should be set to the deadline at the front of the queue.
3) An async wait should only every be queued if:
3a) The current async wait operation just finished, but there are
still timers left in the queue.
3b) There is no async wait operation in-flight, and there is now a
timer in the queue.
So, rename `set_timer` to `setup_zircon_timer`. Change the previous
users of `set_timer` to call `setup_zircon_timer` any time the queue's
state changes in a meaningful way.
While we are at it, remember the last deadline we set for the
underlying zircon timer, and only reprogram the timer when there has
been a change. This can eliminate a small number of duplicate timer
set operations during some timing edge cases.
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1206391
Original-Revision: 4dad906d96f6c7c8516e3854d5a52eaedb18e0e2
GitOrigin-RevId: 75d0da6abcfc30cb5229e194325d2069670eeaee
Change-Id: Ia0cbe402399def7d29f95c65b2b13af161bb343b
This repository contains Fuchsia's Global Integration manifest files.
All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.
Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance in one of the communication channels documented at get involved.
First install Jiri.
Next run:
$ jiri init $ jiri import minimal https://fuchsia.googlesource.com/integration $ jiri update
Third party projects should have their own subdirectory in ./third_party.