Top "Gettimeofday" questions

How to subtract two gettimeofday instances?

I want to subtract two gettimeofday instances, and present the answer in milliseconds. The idea is: static struct timeval tv; …

c++ linux gettimeofday