do you know how to use gettimeofday for measuring computing time? I can measure one time by this code:
char buffer[30]; struct timeval tv; time_t curt
No. gettimeofday should NEVER be used to measure time.
This is causing bugs all over the place. Please don't add more bugs.