Commit b3d35f74 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

port perfnotes to windows. addresses #1246

git-svn-id: file:///svn/toku/tokudb.1032b@8046 c7de825b-a66e-492c-adef-691d508d4ae1
parent e265bac5
......@@ -3,7 +3,7 @@
/* Insert a bunch of stuff */
#include <portability.h>
#include <toku_portability.h>
#include <assert.h>
#include <errno.h>
#include <string.h>
......
/* Scan the bench.tokudb/bench.db over and over. */
#include <portability.h>
#include <toku_portability.h>
#include <assert.h>
#include <db.h>
#include <errno.h>
......
......@@ -9,5 +9,8 @@ all: $(TARGETS)
%: %.c
$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< $(LDFLAGS)
test-gettime: test-gettime.c
$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< $(LDFLAGS) -lrt
clean:
rm -rf $(TARGETS)
\ No newline at end of file
#include <stdio.h>
#include <assert.h>
#include <unistd.h>
#include <toku_time.h>
int main(void) {
int r;
struct timespec ts;
r = clock_gettime(CLOCK_REALTIME, &ts);
assert(r == 0);
sleep(10);
r = clock_gettime(CLOCK_REALTIME, &ts);
assert(r == 0);
return 0;
}
#include <stdio.h>
#include <assert.h>
#include <toku_time.h>
int main(void) {
int r;
struct timeval tv;
struct timezone tz;
r = gettimeofday(&tv, &tz);
assert(r == 0);
return 0;
}
#include <time.h>
#include <sys/time.h>
#ifndef TOKU_TIME_H
#define TOKU_TIME_H
#include <time.h>
#ifdef __cplusplus
extern "C" {
#endif
int gettimeofday(struct timeval *tv, struct timezone *tz);
#ifdef __cplusplus
};
#endif
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment