Class: Clock

og.Clock

new og.Clock(params)

Class represents application timer that stores custom current julian datetime, and time speed multiplier.
Name Type Description
params Object optional Clock parameters:
Name Type Default Description
startDate number 0.0 optional Julian start date.
endDate number 0.0 optional Julian end date.
currentDate number optional Julian current date. Default: current date.
multiplier number 1.0 optional Time speed multiolier.

Members

activeboolean

Timer activity.

currentDatenumber

Current julian datetime.

readonlydeltaTicksnumber

Animation frame delta time.

endDatenumber

End julian date clock loop.

eventsog.Events

Clock events.

multipliernumber

Timer speed multiplier.

namestring

Clock name.

startDatenumber

Start julian date clock loop.

Methods

equal(){boolean}

Returns:
Type Description
boolean - Returns true if a clock is the same instance.
Returns current application date.
Returns:
Type Description
Object

setDate(date)

Sets current clock datetime.
Name Type Description
date Object JavaScript Date object.