How to sleep accurately
BCS
ao at pathlink.com
Mon Jul 2 10:09:04 PDT 2007
Reply to Jason,
> BCS wrote:
>
>> if you are on x86 and if you can get the clock speed and if you don't
>> mind asm you can get a clock cycle resolution busy wait using:
>>
> I'm trying to stay as cross platform as possible. It's currently used
> on x86 and mac. I'm discovering that gettimeofday is not available on
> the mac. I still have to find another solution.
>
well if you are using x86 mac you would be potable and PPC has a similar
CPU clock counter. But you would still need something else for any other
system.
More information about the Digitalmars-d-learn
mailing list