#include <iostream>
#include <time.h>
using namespace std;
int main()
{
timespec time1, time2;
int temp;
clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &time1);
It's like a party
clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &time2);
return 0;
}
It worked well when I did it on my school computer, but I get an error when I do it on my laptop.
I don't know what to do at times like this ㅜㅜ/
c++ c linux posix time.h
The librt.so
link doesn't seem to work.
Please insert -lrt
in the g++ command line
© 2024 OneMinuteCode. All rights reserved.