Here's what I got from a pure C version of your code (MacOS X 10.5.8 - Leopard; MacBook Pro):
#include <time.h>
#include <stdio.h>
int main(void)
{
clock_t start = clock();
clock_t end = clock();
float dif_sec = ((float)end-start)/CLOCKS_PER_SEC;
printf("%s: %f seconds\n", "difference", dif_sec);
printf("%s: %d\n", "CLOCKS_PER_SEC", CLOCKS_PER_SEC);
return(0);
}
This is how I compiled it, and ran it, and the results I got:
Osiris JL: gcc -m32 -o xxx-32 xxx.c
Osiris JL: gcc -m64 -o xxx-64 xxx.c
Osiris JL: ./xxx-32
difference: 0.000006 seconds
CLOCKS_PER_SEC: 1000000
Osiris JL: ./xxx-64
difference: 0.000009 seconds
CLOCKS_PER_SEC: 1000000
Osiris JL: ./xxx-64
difference: 0.000003 seconds
CLOCKS_PER_SEC: 1000000
Osiris JL: ./xxx-32
difference: 0.000003 seconds
CLOCKS_PER_SEC: 1000000
Osiris JL:
Looks sort of OK - rather fast, perhaps, but that's OK; it is a nice new machine, and it doesn't take long to make two system calls in a row.