What is a clock tick equal to in ctime??
The time_t type is an implementation-defined arithmetic type capable of representing times. Use difftime function to get the difference between two times of type time_t in seconds as a double value:
#include <time.h>
...
time_t t;
time(&t);
printf("time_t step %f sec\n",difftime(t+1,t)); // time_t precision
As usually, it's equal to 1 sec (but it's not the language standard requirement).
Reputation Points: 1234
Solved Threads: 347
Postaholic
Offline 2,001 posts
since Jul 2008