Answers for "gettimeofday c example milliseconds"

0

gettimeofday c example milliseconds

struct timeval  tv;
gettimeofday(&tv, NULL);

double time_in_mill = 
         (tv.tv_sec) * 1000 + (tv.tv_usec) / 1000 ; // convert tv_sec & tv_usec to millisecond
Posted by: Guest on June-03-2021

Browse Popular Code Answers by Language