WoW:API GetTime

From AddOn Studio
Revision as of 22:49, 29 April 2006 by WoWWiki>Zlixar (Indentation Error.)
Jump to navigation Jump to search
GetTime -Documentation by Zlixar, updated by Thorarin-

When called, returns the current system uptime in seconds, with millisecond precision.

seconds = GetTime();

Arguments
None

Returns
seconds
Floating Point Number - The current system uptime in seconds.

Example
seconds = GetTime();
print("Current system uptime is: "..seconds.." seconds!");
Result
Current system uptime is: 60123.558 seconds!

Details
Contrary to what some believe, this does not return your current session time, time since launching the game, or time since the last patch. It returns the system uptime in seconds.
In Windows, this is reported as the Windows kernel function GetTickCount(), divided by 1000.

Template:WoW API