TimerClose extension
An extension on the Timer class that allows you to manage its lifecycle
with a HasCloser's Closer. This extension simplifies the process of adding
a Timer to a Closer while hiding the SingleAutoClosable implementation details.
Methods
-
closeWith(HasCloser hasCloser, {void onClose()?})
→ void
-
Available on Timer,
provided by the TimerClose extension
Associates the Timer with the Closer context. You can
provide an optional onClose
callback function to define custom actions
to be performed when the Timer is closed.