Click to See Complete Forum and Search --> : time()


cybercrypt
02-20-2003, 12:27 PM
I have the following code:

time_t time1, time2;

time( &time1 );

... do some operations....

time( &time2 );

now that I have two times they appear to only hold seconds with no further precision. I would like to see the difference in milli-seconds but can't quite figure out how I should do this.

Thanks,


CyberCrypt

bwkaz
02-20-2003, 02:40 PM
That's because, from man 2 time:

NAME
time - get time in seconds ;)

For milliseconds, look at man 2 gettimeofday instead.

cybercrypt
02-20-2003, 02:48 PM
thats what I was looking for...


CyberCrypt