c get time in milliseconds

[ad_1]

c get time in milliseconds
#include 

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: 
    return milliseconds;
}

[ad_2]

Content Protection by DMCA.com