Skip to content
Snippets Groups Projects
Commit ccb285f2 authored by Nick Zavaritsky's avatar Nick Zavaritsky
Browse files

Use gettimeofday in tuple_bench, no clock_gettime on osx

parent 21c45180
No related branches found
No related tags found
No related merge requests found
#include "module.h"
#include "msgpuck/msgpuck.h"
#include <time.h>
#include <sys/time.h>
double
proctime(void)
{
struct timespec ts;
clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts);
return (double) ts.tv_sec + ts.tv_nsec / 1e9;
struct timeval tv;
gettimeofday(&tv, NULL);
return (double) tv.tv_sec + 1e-6 * tv.tv_usec;
}
int
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment