Register a timer task

Description

A convenience function for creating a QTimer object and registering and R handler that is fired after a specified delay. The timer continues to fire until it is stopped. This does not work yet.

Usage

1
qtimer(delay, handler)

Arguments

delay

The delay, in milliseconds.

handler

The R function to fire after the delay.

Value

A QTimer object. To stop it, call the stop method.

Author(s)

Michael Lawrence

Examples

1
2
3
4
5
timer <- qtimer(2000, function() {
  print("time out")
})
timer$singleShot <- TRUE
timer$start()