C Get Time In Milliseconds

[Solved] C Get Time In Milliseconds | C - Code Explorer | yomemimo.com
Question : c get time in milliseconds

Answered by : average-addax-adb1j512kcim

#include <sys/time.h>
long long current_timestamp() { struct timeval te; gettimeofday(&te, NULL); // get current time long long milliseconds = te.tv_sec*1000LL + te.tv_usec/1000; // calculate milliseconds // printf("milliseconds: %lld\n", milliseconds); return milliseconds;
}

Source : | Last Update : Sun, 13 Jun 21

Answers related to c get time in milliseconds

Code Explorer Popular Question For C