# 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

  • create
  • schedule
  • stopAll

# API Documentation

# Methods

# create

Signature cp.rx.TimeoutScheduler.create() -> cp.rx.TimeoutScheduler
Type Method
Description Creates a new TimeoutScheduler.
Parameters
  • None
Returns
  • The new TimeoutScheduler.
Notes None
Examples None
Source src/extensions/cp/rx/TimeoutScheduler.lua line 17

# schedule

Signature cp.rx.TimeoutScheduler:schedule(action[, delay]) -> cp.rx.TimeoutScheduler
Type Method
Description Schedules 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
Notes None
Examples None
Source src/extensions/cp/rx/TimeoutScheduler.lua line 30

# stopAll

Signature cp.rx.TimeoutScheduler:stopAll() -> nil
Type Method
Description Stops all future timers from running and clears them.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/extensions/cp/rx/TimeoutScheduler.lua line 51