The TickCount function returns the time that has elapsed since the Macintosh was turned on, in sixtieths of a second.
From C or C++:
#include <Events.h> pascal unsigned long TickCount(void);
From Pascal:
FUNCTION TickCount: LongInt;
For more information, see Inside Macintosh: Macintosh Toolbox Essentials, page 2-112.
#include <sys/time.h>
#include <sys/resource.h>
long timenow();
/* Returns user time in milliseconds since start of process */
long timenow()
{
struct rusage r;
getrusage( RUSAGE_SELF, &r );
return (r.ru_utime.tv_sec * 1000 + r.ru_utime.tv_usec / 1000);
}