main: switched clock_gettime usage to gettimeofday for compatibility reasons.