Murl Engine Lua Addon API  Version 1.0 beta
Murl.Core.IClock

The clock interface.

The clock is used by the engine core to determine frame duration and logik ticks. The engine clock is configured by the IEngineConfiguration interface.


Table members

Methods


SetDeltaLimit(limit)

Set the maximum frame duration. The default value is 1000 milliseconds.

SetDeltaLimit(Murl.System.Time limit)

Parameters
limitThe maximum frame duration.

GetDeltaLimit()

Get the maximum frame duration.

Murl.System.Time GetDeltaLimit()

Returns
Murl.System.Time The maximum frame duration.

SetTimeBase(timeBase)

Set the time base factor. The delta time is multiplied by the time base factor. The default time base factor is 1.0.

SetTimeBase(Number timeBase)

Parameters
timeBaseThe time base factor.

GetTimeBase()

Get the time base factor.

Number GetTimeBase()

Returns
Number The time base factor.

SetAveragingFactor(factor)

Set the averaging factor. The delta time is multiplied by the averaging factor plus the last delta time multiplied by 1 - the averaging factor. The default averaging factor is 0.1.

SetAveragingFactor(Number factor)

Parameters
factorThe averaging factor.

GetAveragingFactor()

Get the averaging factor.

Number GetAveragingFactor()

Returns
Number The averaging factor.

Start()

Start the clock measurement.

Start()


Stop()

Stop the clock measurement.

Stop()


PauseLogicTicks()

Pause the logic tick measurement.

PauseLogicTicks()


ContinueLogicTicks()

Continue the logic tick measurement.

ContinueLogicTicks()


ResetAveraging(frameDuration, numFrames)

Reset the internally filtered delta value.

ResetAveraging(Murl.System.Time frameDuration, Integer numFrames)

Parameters
frameDurationThe desired frame duration, or 0.0 if variable.
numFramesThe number of subsequent frames where averaging is disabled.

Update()

Update the clock measurement. The clock is updated every time a frame is drawn. At this point the clock measures the frame duration and calculates the logic ticks.

Update()


ResetTotalRunningTime()

Reset the total running time.

ResetTotalRunningTime()


GetTotalRunningTime()

Get the total running time.

Murl.System.Time GetTotalRunningTime()

Returns
Murl.System.Time The total running time.

GetCurrentTime()

Get the current time.

Murl.System.Time GetCurrentTime()

Returns
Murl.System.Time The current time.

GetNumberOfLogicTicksPerFrame()

Get the number of logic ticks per frame.

Integer GetNumberOfLogicTicksPerFrame()

Returns
Integer The number of logic ticks per frame.

GetFrameNumber()

Get the frame number.

Integer GetFrameNumber()

Returns
Integer The frame number.

GetLogicTickNumber()

Get the logick tick number.

Integer GetLogicTickNumber()

Returns
Integer The logick tick number.

GetFrameTime()

Get the frame time.

Number GetFrameTime()

Returns
Number The frame time.

GetLogicTickTime()

Get the logick tick time.

Number GetLogicTickTime()

Returns
Number The logick tick time.

GetFrameDuration()

Get the frame duration.

Number GetFrameDuration()

Returns
Number The frame duration.

GetLogicTickDuration()

Get the logick tick duration.

Number GetLogicTickDuration()

Returns
Number The logick tick duration.