Win32Shell

Andreas Raab andreas.raab at gmx.de
Thu Aug 21 17:25:20 UTC 2003


> This application is installed on a bunch of Win98 machines, 
> and on three of those machines, this plugin call fails, and
> the method returns self (a Win32Shell) instead of an integer
> error number. The DLL this method calls into exists on
> these machines, and appears to be the same ones. What can
> cause this primitive/plugin call to fail?

Lots of things. It'll tell you what failed if the FFI call spec is followed
by "self externalCallFailed" which (apparently) is missing here.

> 2) He is doing some millisecond timing. What is the resolution of the
> millisecondClockValue timer?

1ms IF AND ONLY IF:
a) Your hardware supports that resolution
b) Your OS supports that resolution
c) You don't have lots of things in the background running

The VM tries Really Hard (tm) to get millisecond accuracy but there is only
so much it can do. The way to see the spread is something like:

	((1 to: 1000) 
		collect:[:i| [(Delay forMilliseconds: 1) wait] timeToRun])
		asBag sortedCounts.

On XP using a 3.5.1 VM this yields:

	a SortedCollection(990->1 10->2)

so we're pretty close to 1ms.

> The results he is getting are clustering around 6 millisecond
> groups, which makes the entire application worthless.

I would suspect that's due to using Windows 98.

> Is there a more precise millisecond timer?

No. The VM uses the recommend high-resolution multi-media timer.

Cheers,
  - Andreas



More information about the Squeak-dev mailing list