To stop the function:

  • Close the window it is attached to

  • Use a global logical value that is consulted inside the user func to determine if any action should be taken

launch_idle_func(win, user_func, fps = 30, initial_delay = 100)

Arguments

win

top level window object

user_func

users R function. This function will be called within the idle loop within any argumnets

fps

desired frame rate. default: 30

initial_delay

initial delay before running function for the first time. In milliseconds. Default: 1000