"EnTerr" wrote:
"TheEndless" wrote:
FWIW, I've seen a "Wait(1, port)" take anywhere from 1ms to as much as 20ms (possibly even higher), so my guess is that it's dependent on a number of factors that can't be definitively quantified into a percentage.
You misunderstood the question.
The example you are giving only shows that 1ms wait cannot be trusted within 10% variation. And i already said i don't imagine 3ms can be trusted, so no news there.
Won't you think 1000ms wait will be correct give or take 100ms and that is not "dependent on a number of factors"?
There are some values above which this is the case. I asked which are they - and even gave MCQ to pick
I'm still not sure I understand the question, but I just wrote up a simple test that loops through each Wait() 100 times returning the average time, the lowest time and the highest time for each. I ran it three times and got the following results:
------ 1st Run ------
Wait(1, port) Average: 10.18 Shortest: 8 Longest: 20
Wait(3, port) Average: 10.19 Shortest: 10 Longest: 19
Wait(10, port) Average: 19.99 Shortest: 19 Longest: 21
Wait(30, port) Average: 39.99 Shortest: 39 Longest: 41
Wait(100, port) Average: 109.99 Shortest: 109 Longest: 110
Wait(300, port) Average: 309.99 Shortest: 309 Longest: 311
Wait(1000, port) Average: 1009.99 Shortest: 1009 Longest: 1011
------ 2nd Run ------
Wait(1, port) Average: 10.23 Shortest: 8 Longest: 22
Wait(3, port) Average: 10.19 Shortest: 10 Longest: 19
Wait(10, port) Average: 19.99 Shortest: 19 Longest: 21
Wait(30, port) Average: 39.99 Shortest: 39 Longest: 41
Wait(100, port) Average: 109.99 Shortest: 109 Longest: 110
Wait(300, port) Average: 309.99 Shortest: 309 Longest: 310
Wait(1000, port) Average: 1009.99 Shortest: 1009 Longest: 1011
------ 3rd Run ------
Wait(1, port) Average: 10.16 Shortest: 9 Longest: 20
Wait(3, port) Average: 10.09 Shortest: 10 Longest: 19
Wait(10, port) Average: 19.99 Shortest: 19 Longest: 21
Wait(30, port) Average: 39.99 Shortest: 39 Longest: 40
Wait(100, port) Average: 110.09 Shortest: 108 Longest: 122
Wait(300, port) Average: 309.99 Shortest: 309 Longest: 311
Wait(1000, port) Average: 1009.99 Shortest: 1009 Longest: 1011
I'm not sure if that tells you what you want to know, but it looks like you can pretty much count on 10ms being the lowest you can go, and a roughly, fairly consistent, 10ms overage for everything above that.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)