#include <iostream>
#include <time.h>
#include <sys/timeb.h>
using namespace std;

int main()
{
    long long time_last;
    time_last = time(NULL);   
    
    cout<<time_last<<endl;    //秒数

    struct timeb t1;
    ftime(&t1);

    cout<<t1.time<<endl;    //秒数
    cout<<t1.millitm<<endl;    //毫秒数

    system("pause");
    return 0; 
}

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-26
  • 2021-11-22
  • 2022-12-23
  • 2022-01-18
  • 2021-12-26
  • 2021-11-17
猜你喜欢
  • 2021-10-05
  • 2022-01-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-25
相关资源
相似解决方案