• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

loweest accurate timeout for a timer?

Status
Not open for further replies.
Level 17
Joined
Apr 27, 2008
Messages
2,455
Accurate in comparison to what? 0-timers are not instant.

More, you can't even back on time if you use a negative period !

0.0
The most accurate value ever. Actually, Timers are accurate, while reals are the suspects.
0.03125 typed as that will result in two values : 0.031250000 or 0.031250002,that's why we put 0.031250000 to prevent inaccuracy.

This is bullshit, these extra zero are 100 % useless, you will have the very same result with 0.03125 or 0.0031250000 with timers.
Mag made many tests about that, maybe it's related to timer accuracy or how 'reals' are handled, but the fact is these '0' are useless.
 
More, you can't even back on time if you use a negative period !



This is bullshit, these extra zero are 100 % useless, you will have the very same result with 0.03125 or 0.0031250000 with timers.
Mag made many tests about that, maybe it's related to timer accuracy or how 'reals' are handled, but the fact is these '0' are useless.

Mag always suggest that value to me,because he said reals are bit inaccurate due to that WE has poor programming(which also the reason why string leaks)
 
Level 5
Joined
May 6, 2013
Messages
125
0.0
The most accurate value ever. Actually, Timers are accurate, while reals are the suspects.
0.03125 typed as that will result in two values : 0.031250000 or 0.031250002,that's why we put 0.031250000 to prevent inaccuracy.

Troll Brain was referring to it making no apparent difference for timers, which is probably right. See:
Assuming a processor with 2ghz, he has 2.000.000.000 clock cycles per second. The difference of your time is 0.000000002 seconds, which means 2.000.000.000hz * 0.000000002 sec = 4 clock cycles, which is barely enough time to do a small if in optimized code. You really can not expect the timer to have any different duration with those numbers.
As for the pure real variable, you are right. 0.03125 will write the same number as 0.031250002, while 0.031250000 will write some other number. But floats certainly are inaccurate already, which is something one knows when he uses floats, so i wouldn't go mad about such a tiny difference :thumbs_up:
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
Exactly, floats are floats, i'm just saying that it doesn't matter for timer periods.
And well, technically strings don't leak, they are recycled like boolexprs. However, if you can destroy boolexprs, you can't destroy strings.
But yeah, if you use string concatenations, you will create a bunch of them in the internal string table, especially with not litteral strings (i mean generated ones, let's say 'random').
 
Status
Not open for further replies.
Top