gettimeofday() revisited
John M McIntosh
johnmci at smalltalkconsulting.com
Sun May 12 17:35:21 UTC 2002
>If anyone still things that calling gettimeofday() multiple thousand times per
>second is a good idea, here is some top output:
Cees have you tried my [ENH] relinquishProcessorForMicroseconds:
change? That might improve the CPU usage.
Also one of the solutions offered for unix is to use the ITIMER
support to have a sig alarm every 1/50 of a sec to update the low
resolution clock that is used in the primitive dispatch logic. That
isn't turned on my default, for a reason I've not heard yet.
On the mac I did try that but had some issues with doing profile
sampling so I migrated to a pthread implementation where we do a wait
for 16 milliseconds on a semaphore. The accuracy here isn't a big
concern, rather we want to know if a larger number of milliseconds
have passed, versus a few.
Is it possible for you to try either of these solutions?
--
--
===========================================================================
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
|