Calculate elapsed time by summing each latency
Use clock_gettime instead of gettimeofday