Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / GetMilliseconds(), when does it reset? And Timer() vs GetMilliseconds.

Author
Message
Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 29th Jan 2017 16:09
If I use GetMilliseconds() to control timing in my app, will GetMilliseconds reset to zero when it goes beyond 2147483647 (4 byte unsigned integer)? And another timer question, is the only advantage of using Timer() which returns a float, that it can return a higher value than GetMilliseconds()?
13/0
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 29th Jan 2017 17:47 Edited at: 29th Jan 2017 17:51
hmm, i guess it will begin from -2,147,483,648 because integer is signed.
Quote: "INTEGER Range : -2,147,483,648 to 2,147,483,647"
https://www.appgamekit.com/documentation/principles/1_datatypes.htm
you can also use ResetTimer() and count the minutes,hours,days separate.

if me calc right it will happen after 24,85 days.
2147483647 / 1000 = Seconds = 2147483,647 / 3600 = Hours = 596,5232352777778 / 24 = Days 24,85513480324074

if the Timer go into a bigger value it will less accurate because it is a float number.
AGK (Steam) V2017.01.09 : Windows 10 Pro 64 Bit : AMD (16.12.1) Radeon R7 265 : Mac mini OS Sierra (10.12.2)
Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 29th Jan 2017 20:17
Oh, yeah, -2,147,483,648 :-P

Quote: "ResetTimer()"

Thanks

13/0

Login to post a reply

Server time is: 2024-11-24 20:58:24
Your offset time is: 2024-11-24 20:58:24