There is test code:
// ppc-amigaos-g++ -D__USE_OLDTIMEVAL__ test_timemeasuer.c
#include <stdio.h>
#include <proto/dos.h>
unsigned int GetTimeStamp()
{
timeval tNow;
gettimeofday(&tNow, NULL);
return ((double)tNow.tv_sec)*1000.0+((double)tNow.tv_usec)/1000.0;
}
int main()
{
int nStartTime=GetTimeStamp();
IDOS->Delay(500);
printf("test time %d ms",GetTimeStamp()-nStartTime);
}
I compile it like
Quote:
ppc-amigaos-g++ -D__USE_OLDTIMEVAL__ test_timemeasuer.c
On running, it wait for some time when Delay() call happens, and then, give me in return 0 ms in printf.
Why ?