Okay, again, I stress that I am working in linux. If you must know how gettimeofday() works then I will explain...

gettimeofday is a function defined in <sys/time.h>.

struct timeval contains two variables, .time_sec and time_usec.

The integers are in those variables