# Module `lib2`

The Help Modul

## Global(s)

cli |
deepcopy(orig) | Make a deep copy of a table
deltaTime(time_a, time_c, time_b) | Time delta in milliseconds
getTime |
hoursToTimer(hours) | Convert hours to timer value
minutesToTimer(minutes) | Convert minutes to timer value
rest(msec) | Wait function
restTask(msec) | Create a new Task for the purpose of waiting
secondsToTimer(secounds, seconds) | Converts seconds to timer value
setTextColor(...) |
taskFactory(name, func, ...) | Factory function for making a new task
timerFactory(name, time, func, ...) | Factory function for making a new scheduled task
unpack2(...) | unpack function with number of arguments on the end.
yrest(msec) | Wait function but let scheduled tasks run if possible.
yrestTask(msec) | Create a new Task for the purpose of waiting This function generate a task in which MM will wait and let scheduled tasks run if possible.

## Global(s)

cli

deepcopy(orig)

  Make a deep copy of a table

  ### Parameter

  - `#table orig` : The table which should be copy

  ### Return value

  #table: copy Your new copy

deltaTime(time_a, time_c, time_b)

  Time delta in milliseconds

  ### Parameters

  - `#table time_a` : The first time table for compare

  - `#table time_c` : The second time table for compare

  - `time_b` :

  ### Return value

  #number: diffrence in milliseconds between the two times.

getTime

  function redirection for compatibility

hoursToTimer(hours)

  Convert hours to timer value

  ### Parameter

  - `#number hours` : The time in hours

  ### Return value

  #number: The time in milliseconds

minutesToTimer(minutes)

  Convert minutes to timer value

  ### Parameter

  - `#number minutes` : The time in minutes

  ### Return value

  #number: The time in milliseconds

rest(msec)

  Wait function

  ### Parameter

  - `#number msec` : Time in milliseconds to wait.

restTask(msec)

  Create a new Task for the purpose of waiting

  ### Parameter

  - `#number msec` : Time in milliseconds to wait.

  ### Return value

  #number: CTask#STATE_PENNDING

secondsToTimer(secounds, seconds)

  Converts seconds to timer value

  ### Parameters

  - `#number secounds` : The time in secounds

  - `seconds` :

  ### Return value

  #number: The time in milliseconds

setTextColor(...)

  dummy function for compatibility

  ### Parameter

  - `...` :

taskFactory(name, func, ...)

  Factory function for making a new task

  ### Parameters

  - `#string name` : The label for the task

  - `#function func` : The function which should be called for the task

  - `#vars ...` : Any additional args for the task.

  ### Return value

  #number: STATE_PENNDING

timerFactory(name, time, func, ...)

  Factory function for making a new scheduled task

  ### Parameters

  - `#string name` : The label for the task

  - `#number time` : The interval for the task in milliseconds.

  - `#function func` : The function which should be called for the task

  - `#vars ...` : Any additional args for the task.

  ### Return value

  #number: STATE_PENNDING

unpack2(...)

  unpack function with number of arguments on the end.

  ### Parameter

  - `#vars ...` : Args to unpack.

  ### Return values

  1. #table: t the unpacked args

  2. #number: n Number of args.

yrest(msec)

  Wait function but let scheduled tasks run if possible.

  ### Parameter

  - `#number msec` : Time in milliseconds to wait.

yrestTask(msec)

  Create a new Task for the purpose of waiting

  This function generate a task in which MM will wait and let scheduled tasks run if possible.

  so that the scheduled tasks will have a greater priority

  ### Parameter

  - `#number msec` : Time in milliseconds to wait.

  ### Return value

  #number: CTask#STATE_PENNDING

## Type `lib2`

## Type `var`

Any type of var including lists

## Type `vars`

One or more incoming argument.