Murl Engine Lua Addon API  Version 1.0 beta
Murl.System.Time

The time class provides high resolution time data.


Table members

Members


Murl.System.Time.MILLI_SECONDS_PER_SECOND

Returns
Integer

Murl.System.Time.MICRO_SECONDS_PER_SECOND

Returns
Integer

Murl.System.Time.NANO_SECONDS_PER_SECOND

Returns
Integer

Murl.System.Time.MICRO_SECONDS_PER_MILLI_SECOND

Returns
Integer

Murl.System.Time.NANO_SECONDS_PER_MILLI_SECOND

Returns
Integer

Murl.System.Time.NANO_SECONDS_PER_MICRO_SECOND

Returns
Integer


Functions


Murl.System.Time.GetNow()

Get the current time-of-day. The time is the number of seconds since 00:00 hours, Jan 1, 1970 UTC.

Murl.System.Time GetNow()

Returns
Murl.System.Time The Time object containing the time from now.

Murl.System.Time.GetTickCount()

Get the current tick count. The tick count is the absolute elapsed time since some arbitrary, fixed point in the past.
It is not affected by changes in the system time-of-day clock.

Murl.System.Time GetTickCount()

Returns
Murl.System.Time The Time object containing the current tick count.

Murl.System.Time.FromSeconds(seconds)

Get the time from specified seconds.

Murl.System.Time FromSeconds(Integer seconds)

Parameters
secondsThe number of seconds.
Returns
Murl.System.Time The Time object containing the number of seconds.

Murl.System.Time.FromMilliSeconds(milliSeconds)

Get the time from specified milliseconds.

Murl.System.Time FromMilliSeconds(Integer milliSeconds)

Parameters
milliSecondsThe number of milliseconds.
Returns
Murl.System.Time The Time object containing the number of milliseconds.

Murl.System.Time.FromMicroSeconds(microSeconds)

Get the time from specified microseconds.

Murl.System.Time FromMicroSeconds(Integer microSeconds)

Parameters
microSecondsThe number of microseconds.
Returns
Murl.System.Time The Time object containing the number of microseconds.

Murl.System.Time.FromNanoSeconds(nanoSeconds)

Get the time from specified nanoseconds.

Murl.System.Time FromNanoSeconds(Integer nanoSeconds)

Parameters
nanoSecondsThe number of nanoseconds.
Returns
Murl.System.Time The Time object containing the number of nanoseconds.

Murl.System.Time.Zero()

Get zero time.

Murl.System.Time Zero()

Returns
Murl.System.Time The Time object containing zero time.

Murl.System.Time.Infinite()

Get infinite time.

Murl.System.Time Infinite()

Returns
Murl.System.Time The Time object containing infinite time.

Murl.System.Time.Min()

Get minimum time.

Murl.System.Time Min()

Returns
Murl.System.Time The Time object containing zero time.

Murl.System.Time.Max()

Get maximum time.

Murl.System.Time Max()

Returns
Murl.System.Time The Time object containing infinite time.

Murl.System.Time.new()

The default constructor. The time is set to zero.

Murl.System.Time new()

Returns
Murl.System.Time

Murl.System.Time.new(seconds)

Constructor taking floating point seconds.

Murl.System.Time new(Number seconds)

Parameters
secondsThe number of seconds.
Returns
Murl.System.Time

Murl.System.Time.new(seconds, nanoSeconds)

Constructor taking seconds and nanoseconds.

Murl.System.Time new(Integer seconds, Integer nanoSeconds)

Parameters
secondsThe number of seconds.
nanoSecondsThe number of nanoseconds.
Returns
Murl.System.Time


Methods


SetNow()

Set to the current time-of-day. The time is the number of seconds since 00:00 hours, Jan 1, 1970 UTC.

SetNow()


SetTickCount()

Set to the current tick count. The tick count is the absolute elapsed time since some arbitrary, fixed point in the past.
It is not affected by changes in the system time-of-day clock.

SetTickCount()


SetZero()

Set to the zero time.

SetZero()


SetInfinite()

Set to the infinite time.

SetInfinite()


GetDouble()

Get the time in floating point seconds.

Number GetDouble()

Returns
Number The time in number of seconds.

SetDouble(seconds)

Set the time from floating point seconds.

SetDouble(Number seconds)

Parameters
secondsThe time in number of seconds.

GetSeconds()

Get the time in integer seconds.

Integer GetSeconds()

Returns
Integer The time in seconds.

SetSeconds(seconds)

Set the time in integer seconds.

SetSeconds(Integer seconds)

Parameters
secondsThe time in seconds.

GetMilliSeconds()

Get the time in milliseconds.

Integer GetMilliSeconds()

Returns
Integer The time in milliseconds.

SetMilliSeconds(milliSeconds)

Set the time in milliseconds.

SetMilliSeconds(Integer milliSeconds)

Parameters
milliSecondsThe time in milliseconds.

GetMicroSeconds()

Get the time in microseconds.

Integer GetMicroSeconds()

Returns
Integer The time in microseconds.

SetMicroSeconds(microSeconds)

Set the time in microseconds.

SetMicroSeconds(Integer microSeconds)

Parameters
microSecondsThe time in microseconds.

GetNanoSeconds()

Get the time in nanoseconds.

Integer GetNanoSeconds()

Returns
Integer The time in nanoseconds.

SetNanoSeconds(nanoSeconds)

Set the time in nanoseconds.

SetNanoSeconds(Integer nanoSeconds)

Parameters
nanoSecondsThe time in nanoseconds.

GetMilliSecondsFraction()

Get the seconds fractional part in milliseconds.

Integer GetMilliSecondsFraction()

Returns
Integer The seconds fractional part in milliseconds.

GetMicroSecondsFraction()

Get the seconds fractional part in microseconds.

Integer GetMicroSecondsFraction()

Returns
Integer The seconds fractional part in microseconds.

GetNanoSecondsFraction()

Get the seconds fractional part in nanoseconds.

Integer GetNanoSecondsFraction()

Returns
Integer The seconds fractional part in nanoseconds.

IsZero()

Check if the time is zero.

Boolean IsZero()

Returns
Boolean true if the time is zero.

IsInfinite()

Check if the time is infinite.

Boolean IsInfinite()

Returns
Boolean true if the time is infinite.

ToString()

Get the string representation of the object.

String ToString()

Returns
String The string representation of the object.


Metamethods


The tostring operator

Converts the object content to a string in a reasonable format.

Returns
ToString()

The addition operator.

Addition operator.

Returns
Murl.System.Time = Murl.System.Time + Murl.System.Time

The subtraction operator.

Subtraction operator.

Returns
Murl.System.Time = Murl.System.Time - Murl.System.Time

The equal to operator.

Equal to comparison operator.

Returns
Boolean = Murl.System.Time == Murl.System.Time

The less than operator.

Less than operator.

Returns
Boolean = Murl.System.Time < Murl.System.Time

The less than or equal operator.

Less than or equal to operator.

Returns
Boolean = Murl.System.Time <= Murl.System.Time