Module metro

metro

Class metro

Metro.num_metros constant representing the maximum number of metros.
metro:init (arg[, arg_time[, count]]) initialize a new metro if one is available
metro:free (id) free up a metro slot also stops a metro
metro:start (self, number[, count[, stage]]) starts a metro
metro:stop (self) stops a metro


Class metro

metro object class
Metro.num_metros
constant representing the maximum number of metros. the actual number is hard-coded in zig, so changing this value won't have any effect
  • num_metros 36
metro:init (arg[, arg_time[, count]])
initialize a new metro if one is available

Parameters:

  • arg func or {event=func,time=number,count=integer} either a function to be executed repeatedly, or a table of arguments
  • arg_time number time interval to execute the function; defaults to 1.0 (optional)
  • count number if positive, the number of times to execute; defaults to -1 (infinite repeats) (optional)

Returns:

    optional metro metro if one if is available
metro:free (id)
free up a metro slot also stops a metro

Parameters:

  • id integer (1-36)
metro:start (self, number[, count[, stage]])
starts a metro

Parameters:

  • self metro metro
  • number time |{time=number,count=integer,stage=integer} either a table of arguments or a (fractional) time interval in seconds
  • count integer stage to stop at (defaults to -1: infinite) (optional)
  • stage integer stage to start at (optional)
metro:stop (self)
stops a metro

Parameters:

generated by LDoc 1.5.0 Last updated 2024-01-13 13:12:10