我对Ubuntu很陌生,但我似乎无法让它工作.它在我学校的电脑上运行良好,我不知道我在做什么.我已经查过usr/include次了.那里很好.以下是代码:
#include <iostream>
#include <time.h>
using namespace std;
int main()
{
timespec time1, time2;
int temp;
clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &time1);
//do stuff here
clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &time2);
return 0;
}
我使用代码块作为我的IDE来构建和运行.任何帮助都会很好,谢谢.