Quantcast
Need some clarification regarding 'GetTime()' - WoWInterface
Thread Tools Display Modes
08-14-16, 03:12 AM   #1
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 356
Need some clarification regarding 'GetTime()'

According to WoWWiki, GetTime() returns the time (in seconds) since your own computer booted up.

So, I dumped it and got 116717 seconds which would be 32.42 hours which absolutely doesn't make sense.

Could I get some clarification regarding this?
  Reply With Quote
08-14-16, 04:40 AM   #2
syncrow
A Flamescale Wyrmkin
 
syncrow's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 149
just tested it:

Code:
/run print(GetTime())
result:
Code:
1244.085
->1244s, 85ms
->->20m, 44s, 85ms
seems to work, fine
__________________

Last edited by syncrow : 08-14-16 at 04:45 AM.
  Reply With Quote
08-14-16, 05:17 AM   #3
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 356
Originally Posted by syncrow View Post
just tested it:

Code:
/run print(GetTime())
result:
Code:
1244.085
->1244s, 85ms
->->20m, 44s, 85ms
seems to work, fine
That's interesting.

When I print the same thing, it results this:



Code:
/run print(GetTime());
	125084.976
	-> 125084 seconds 976 milliseconds
	-> -> 2084 minutes 44 seconds 976 milliseconds
	-> -> -> 34 hours 44 minutes 44 seconds 976 milliseconds
  Reply With Quote
08-14-16, 11:34 AM   #4
TOM_RUS
A Warpwood Thunder Caller
AddOn Author - Click to view addons
Join Date: Sep 2008
Posts: 95
Pretty sure sleep/hibernate doesn't reset time since system start. Have you checked what system uptime displayed in windows task manager (probably only available on Win10)? It should match perfectly.
  Reply With Quote
08-14-16, 07:41 PM   #5
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 356
Originally Posted by TOM_RUS View Post
Pretty sure sleep/hibernate doesn't reset time since system start. Have you checked what system uptime displayed in windows task manager (probably only available on Win10)? It should match perfectly.
Yeah, you were right!

Just checked my system's uptime in task manager and it was like 2 days 1 hour x minutes xx seconds.

According to research, it's more like a new feature from windows 8 that the CPU hibernates itself even if you shut down your computer. (Further details and way to turn this feature off can be found here)

It's working perfect now
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Need some clarification regarding 'GetTime()'

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off