📌  相关文章
📜  c 以毫秒为单位获取时间 - C 编程语言代码示例

📅  最后修改于: 2022-03-11 15:04:44.335000             🧑  作者: Mango

代码示例1
#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: %lld\n", milliseconds);
    return milliseconds;
}