ndk c++获取当前时间

来源:互联网 发布:二叉树层序遍历算法 编辑:程序博客网 时间:2024/06/07 11:39
#include <stdio.h>  #include <sys/time.h>    long getCurrentTime()  {     struct timeval tv;     gettimeofday(&tv,NULL);     return tv.tv_sec * 1000 + tv.tv_usec / 1000;  }    int main()  {      printf("c/c++ program:%ld\n",getCurrentTime());      return 0;  }

0 0
原创粉丝点击