Oddness in Delay behavior in Cog...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Oddness in Delay behavior in Cog...

LawsonEnglish
 
http://pastebin.com/zqhCpxvL

In a nutshell:

0 to: 11 do: [:i|
myWait := Delay forMilliseconds: i.
Transcript show: (myWait asString),':';cr.
5 timesRepeat: [Transcript show: (Time millisecondsToRun: [1000
timesRepeat: [myWait wait]]);cr.]].


delay of 0 => 0 ms
delay of 1 => 2 ms
delay of 2 => 2 ms
delay of 3 => 4 ms
delay of 4 => 4 ms
delay of 5 => 6 ms

etc

Not a real biggie, but just seemed odd.

Lawson