#cp.rx.TimeoutScheduler

A scheduler that uses the hs.timer library to schedule events on an event loop.


#API Overview

Methods - API calls which can only be made on an object returned by a constructor


#API Documentation

#Methods

Signaturecp.rx.TimeoutScheduler.create() -> cp.rx.TimeoutScheduler
TypeMethod
DescriptionCreates a new TimeoutScheduler.
Parameters
  • None
Returns
  • The new TimeoutScheduler.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/rx/TimeoutScheduler.lua line 17

Signaturecp.rx.TimeoutScheduler:schedule(action[, delay]) -> cp.rx.TimeoutScheduler
TypeMethod
DescriptionSchedules an action to run at a future point in time.
Parameters
  • action - The action to run.
  • delay - The delay, in milliseconds. Defaults to 0.
Returns
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/rx/TimeoutScheduler.lua line 30

Signaturecp.rx.TimeoutScheduler:stopAll() -> nil
TypeMethod
DescriptionStops all future timers from running and clears them.
Parameters
  • None
Returns
  • None
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/rx/TimeoutScheduler.lua line 51