JsUnit

Class Clock

Object
   |
   +--Clock

class Clock


Clock stores callbacks and executes them when it is told to simulate the advancing of time
Defined in jsUnitMockTimeout.js


Field Summary
<static>  Object nowMillis
          The current milliseconds
<static>  Object scheduledFunctions
          Hash of milliseconds to scheduled functions
<static>  Object timeoutsMade
          The number of timeouts executed
 
Constructor Summary
Clock()
           
 
Method Summary
<static> void reset()
           Resets the clock - clears the scheduledFunctions, the current milliseconds, and the timeouts made count
<static> void scheduleFunction(timeoutKey, funcToCall, millis, recurring)
           Schedules a function to be executed at the given number of milliseconds from now
<static> void tick(millis)
           Simulate the advancing of time.

Field Detail

nowMillis

<static> Object nowMillis

scheduledFunctions

<static> Object scheduledFunctions

timeoutsMade

<static> Object timeoutsMade

Constructor Detail

Clock

Clock()

Method Detail

reset

<static> void reset()

scheduleFunction

<static> void scheduleFunction(timeoutKey, funcToCall, millis, recurring)

tick

<static> void tick(millis)

JsUnit

www.jsunit.net
Documentation generated by JSDoc on Sun Sep 9 15:34:58 2007