Packageutil
Classpublic class WorkTimer
InheritanceWorkTimer Inheritance flash.events.EventDispatcher

WorkTimer class provides functionality for creating timers that work during a specified time interval more than one day.



Public Properties
 PropertyDefined by
  dayCount : uint
Number of days for timer work.
WorkTimer
  endTime : TimeObject
Time of the day for timer to stop.
WorkTimer
  isWork : Boolean = false
The current state of timer(is it working or not).
WorkTimer
  startTime : TimeObject
Time of the day for timer to start.
WorkTimer
Public Methods
 MethodDefined by
  
WorkTimer(startTime:TimeObject, endTime:TimeObject, days:uint, interval:uint = 1000)
Creates a new WorkTimer instance.
WorkTimer
  
start():void
Starts the work of the timer
WorkTimer
  
stop():void
Stops the work of the timer
WorkTimer
Property detail
dayCountproperty
public var dayCount:uint

Number of days for timer work.

endTimeproperty 
public var endTime:TimeObject

Time of the day for timer to stop.

isWorkproperty 
public var isWork:Boolean = false

The current state of timer(is it working or not).

startTimeproperty 
public var startTime:TimeObject

Time of the day for timer to start.

Constructor detail
WorkTimer()constructor
public function WorkTimer(startTime:TimeObject, endTime:TimeObject, days:uint, interval:uint = 1000)

Creates a new WorkTimer instance.

Parameters
startTime:TimeObject — time of the day for timer to start
 
endTime:TimeObject — time of the day for timer to stop
 
days:uint — how many days should timer work
 
interval:uint (default = 1000) — timer tick interval, in milliseconds, during its work
Method detail
start()method
public function start():void

Starts the work of the timer

stop()method 
public function stop():void

Stops the work of the timer