ae.sys.timing

Management of timed events.

Public Imports

core.time
public import core.time;
Undocumented in source.

Members

Classes

Timer
class Timer

Manages and schedules a list of timer tasks.

TimerTask
class TimerTask

Represents a task that needs to run at some point in the future.

Functions

clearTimeout
void clearTimeout(TimerTask task)

Calls task.cancel.

setInterval
TimerTask setInterval(void delegate(Args) handler, Duration delay, Args args)

Convenience function to schedule and return a TimerTask that runs handler after delay repeatedly.

setTimeout
TimerTask setTimeout(void delegate(Args) handler, Duration delay, Args args)

Convenience function to schedule and return a TimerTask that runs handler after delay once.

throttle
bool throttle(MonoTime last, Duration span)

Used to throttle actions to happen no more often than a certain period. If last was less that span ago, return false. Otherwise, update last to the current time and return true.

Properties

mainTimer
Timer mainTimer [@property getter]

The default timer

Structs

MonoTime
deprecated struct MonoTime

Prototype for core.time.MonoTime (TickDuration replacement). See https://github.com/D-Programming-Language/druntime/pull/711

Meta

License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Authors

Simon Arlott Vladimir Panteleev <ae@cy.md>