Questions tagged «time.h»

4
C ++错误:未定义对“ clock_gettime”和“ clock_settime”的引用
我对Ubuntu相当陌生,但似乎无法使它正常工作。它可以在我的学校计算机上正常工作,我不知道自己在做什么。我检查了usr / include和time.h就好了。这是代码: #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; } 我正在使用CodeBlocks作为我的IDE来进行构建和运行。任何帮助都会很棒,谢谢。
157 c++  linux  ubuntu  posix  time.h 
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.