timeval end_time;
timeval Dbg_timer;
The above time structures where initialized with gettimeofday()
at some point.
Below is how I calculated the time difference:
long int elaspsed_time_s = end_time.tv_sec - Dbg_timer.tv_sec;
printf("elaspsed_time_s =%d -> end_time_tv_sec=%d Dbg_timer_tv_sec=%d \n",
elaspsed_time_s, end_time.tv_sec, Dbg_timer.tv_sec);
The Output:
elaspsed_time_s =3 -> end_time_tv_sec=1631446699 Dbg_timer_tv_sec=1631446699
How is the above possible? What is really going on?