Windows VM: Are delays shorter than 10ms possible?
John M McIntosh
johnmci at smalltalkconsulting.com
Thu Jun 20 16:19:38 UTC 2002
>I also get 10 as an answer, which indicates that the primitive does not
>work properly for small numbers.
>
>Did anyone run into the same problem and what do you suggest to fix
>this?
>
>Cheers,
>Nathanael
>
>BTW: I'm using VM 3.1 alpha build 6 (May 17, 2002)
This was a discussion item back in March of this year.
I thought windows gave good numbers? Andreas told me that he triggers
a look for checkForInterrupts every 1ms? by fiddling with the
interruptCheckCounter on each ms clock pulse?
The 3.2.7b6 macintosh VM under os-x 10.1.5 gives with this code
| bag time |
bag := Bag new.
time := Time millisecondClockValue.
1 to: 1000 do:[:i|
[Time millisecondClockValue = time] whileTrue.
bag add: (Time millisecondClockValue - time).
time := Time millisecondClockValue.
].
bag sortedCounts
a SortedCollection(996->1 2->2 1->4 1->11)
Try it and report your numbers, others are welcome to try too.
As background there are issues with
ProcessorScheduler>>relinquishProcessorForMicroseconds:
see my notes on this " [ENH] relinquishProcessorForMicroseconds:"
from May 6th 2002.
I submitted a change to have the mac and I'd guess the unix like
operating system to do the checkForInterrupts every 3 ms versus 5ms.
--
--
===========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
===========================================================================
More information about the Squeak-dev
mailing list
|