Hospadar
August 8th, 2007, 08:19 PM
This is probably pretty simple, I want to use hrtime_t and gethrtime() from sys/time.h
Is there something I need to do to make this work other than #include<sys/time.h> ?
my code is like so:
#include<sys/time.h>
<other imports>
using namespace std;
int main() {
hrtime_t start = gethrtime();
<the function I want to time>
hrtime_t stop = gethrtime();
}
I'm just getting a general "‘gethrtime’ was not declared in this scope" error when I try to compile this.
Thanks!
Is there something I need to do to make this work other than #include<sys/time.h> ?
my code is like so:
#include<sys/time.h>
<other imports>
using namespace std;
int main() {
hrtime_t start = gethrtime();
<the function I want to time>
hrtime_t stop = gethrtime();
}
I'm just getting a general "‘gethrtime’ was not declared in this scope" error when I try to compile this.
Thanks!