summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/util.c b/util.c
new file mode 100644
index 0000000..9fadd9f
--- /dev/null
+++ b/util.c
@@ -0,0 +1,9 @@
+#include <sys/time.h>
+#include "util.h"
+
+
+i64 make_timestamp(void){
+ struct timeval tv;
+ gettimeofday(&tv,NULL);
+ return tv.tv_sec*(i64)1000000+tv.tv_usec;
+}