Difference between revisions of "LlGetGMTclock"

From Second Life Wiki
Jump to navigation Jump to search
(added example)
Line 4: Line 4:
|func_footnote=For PST use [[llGetWallclock]]
|func_footnote=For PST use [[llGetWallclock]]
|func_desc
|func_desc
|return_text=that is the time in seconds since midnight GMT
|return_text=that is the time in seconds since midnight GMT.  Seems to be accurate to the millisecond.
|spec
|spec
|caveats
|caveats
|constants
|constants
|examples
|examples=
<pre>
// Gets the number of milliseconds since midnight UTC.
integer GetGMTmsclock()
{
    string stamp = llGetTimestamp();
    return
        (integer) llGetSubString(stamp, 11, 12) * 3600000 +
        (integer) llGetSubString(stamp, 14, 15) * 60000 +
        llRound((float) llGetSubString(stamp, 17, -2) * 1000.0);
}
</pre>
|helpers
|helpers
|also_functions=
|also_functions=

Revision as of 13:12, 28 April 2007

Summary

Function: float llGetGMTclock( );

Returns a float that is the time in seconds since midnight GMT. Seems to be accurate to the millisecond.

For PST use llGetWallclock

Examples

// Gets the number of milliseconds since midnight UTC.
integer GetGMTmsclock()
{
    string stamp = llGetTimestamp();
    return
        (integer) llGetSubString(stamp, 11, 12) * 3600000 +
        (integer) llGetSubString(stamp, 14, 15) * 60000 +
        llRound((float) llGetSubString(stamp, 17, -2) * 1000.0);
}

See Also

Functions

•  llGetWallclock Seconds since midnight PST

Deep Notes

Search JIRA for related Issues

Signature

function float llGetGMTclock();