WoW:API GetTime: Difference between revisions

384 bytes added ,  27 September 2005
m
adjusted example
(removed incorrect information)
m (adjusted example)
Line 1: Line 1:
When called, '''GetTime''' returns current time in seconds:
<center>'''GetTime''' ''-Documentation by [[user:Zlixar|Zlixar]]-''</center>
When called, returns the current system uptime in seconds, with millisecond precision.
  seconds = GetTime();
  seconds = GetTime();
----
;''Arguments''


;Arguments:
:''None''
: none
----
;''Returns''


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 uptime as reported by the Windows kernel function [http://msdn.microsoft.com/library/en-us/sysinfo/base/gettickcount.asp GetTickCount()], divided by 1000.
:;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 uptime as reported by the Windows kernel function [http://msdn.microsoft.com/library/en-us/sysinfo/base/gettickcount.asp GetTickCount()], divided by 1000.


{{Template:WoW API}}
{{Template:WoW API}}
Anonymous user