-
Notifications
You must be signed in to change notification settings - Fork 0
UtilsTimer
Starlon edited this page Nov 30, 2011
·
4 revisions
<tr>
<td class="name" nowrap><a href="#LibTimer:Del">LibTimer:Del</a> ()</td>
<td class="summary">Delete a LibTimer object </td>
</tr>
<tr>
<td class="name" nowrap><a href="#LibTimer:New">LibTimer:New</a> (name, duration, repeating, callback, data, errorLevel)</td>
<td class="summary">Create a new LibTimer object </td>
</tr>
<tr>
<td class="name" nowrap><a href="#LibTimer:Start">LibTimer:Start</a> (duration, data, func)</td>
<td class="summary">Start a timer.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#LibTimer:Stop">LibTimer:Stop</a> ()</td>
<td class="summary">Stop a timer </td>
</tr>
<tr>
<td class="name" nowrap><a href="#LibTimer:TimeElapsed">LibTimer:TimeElapsed</a> ()</td>
<td class="summary">Return how old the timer is since it was started.</td>
</tr>
- LibTimer:Del ()
- Delete a LibTimer object object:Del() Nothing
- LibTimer:New (name, duration, repeating, callback, data, errorLevel)
-
Create a new LibTimer object
LibScriptableTimer:New(name, duration, repeating, callback, data, errorLevel, durationLimit) A new LibScriptableTimer object
<li> name: A name for this timer object </li> <li> duration: The timer's duration in milliseconds. </li> <li> repeating: Whether to repeat the timer or not </li> <li> callback: Function to call when the timer has expired </li> <li> data: Data to pass to the callback </li> <li> errorLevel: Error verbosity level </li> - LibTimer:Start (duration, data, func)
-
Start a timer.
object:Start([duration], [data])
<li> duration: The duration in milliseconds. This is optional. The timer's initialized duration will be replaced by this value. </li> <li> data: Replace the timer's data that will be sent through the callback with this value. </li> <li> func: Replace the timer's callback function </li> - LibTimer:Stop ()
- Stop a timer object:Stop() True if the timer was stopped
- LibTimer:TimeElapsed ()
- Return how old the timer is since it was started. object:TimeElapsed() The remaining duration