Now its working like it should. I didnt change a thing.
"Jay King" <> wrote in message news:3d9155b3@
> I am using a loop like
> strt:
> debug.writeling (randomnumberfunction)
> sleep(1)
> goto strt
> Now the sleep function is actually calling the timer and asking it to

> my thread for 1 milisecond. However it sleeps for what is almost a full
> second. When I remve the sleep the loop throw out random numbers as
> hundreds of numbers a second. So im wondering what could be the cause of
> this? Why isnt the timer object 'sleeping' my thread like it should.
> PS: Last night it was 'sleeping' my thread fine and the program only ate

> and extra 10% of cpu, however it doesnt owrk right anymore and I can only
> get gfast enough speeds without the sleep.. however that eats up to 80%
> extra cpu.