Get millisecond part of time

后端 未结 8 1962
再見小時候
再見小時候 2020-12-18 22:07

I need to get milliseconds from the timer

    // get timer part
    time_t timer = time(NULL);
    struct tm now = *localtime( &timer );
    char timesta         


        
8条回答
  •  轮回少年
    2020-12-18 22:12

    there is the function getimeofday(). returns time in ms check here: http://souptonuts.sourceforge.net/code/gettimeofday.c.html

提交回复
热议问题