WoW:API GetTime: Difference between revisions

41 bytes removed ,  15 August 2023
m
Move page script moved page API GetTime to WoW:API GetTime without leaving a redirect
m (adjusted example)
m (Move page script moved page API GetTime to WoW:API GetTime without leaving a redirect)
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<center>'''GetTime''' ''-Documentation by [[user:Zlixar|Zlixar]]-''</center>
{{wowapi}}__NOTOC__
When called, returns the current system uptime in seconds, with millisecond precision.
Returns the system uptime '''of your computer''' in seconds, with millisecond precision.
  seconds = GetTime();
  seconds = GetTime();
----
 
;''Arguments''
==Parameters==
===Arguments===


:''None''
:''None''
----
===Returns===
;''Returns''
:;seconds : Floating Point Number - The current system uptime in seconds.


:;seconds : Floating Point Number - The current system uptime in seconds.
==Example==
----
;''Example''
  seconds = GetTime();
  seconds = GetTime();
  print("Current system uptime is: "..seconds.." seconds!");
  print("Current system uptime is: "..seconds.." seconds!");
;''Result''
  Current system uptime is: 60123.558 seconds!
  > Current system uptime is: 60123.558 seconds!
----
 
;''Details''
==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.
: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 '''time since your own computer booted up'''.


{{Template:WoW API}}
:In Windows, this is acquired through the Windows kernel function [http://msdn.microsoft.com/en-us/library/ms724408.aspx GetTickCount()], divided by 1000.
Anonymous user