update code

This commit is contained in:
Nick Peng
2018-05-19 22:48:14 +08:00
parent 3ee4bc1dbf
commit 9584d1d082
11 changed files with 1193 additions and 722 deletions

11
util.c Normal file
View File

@@ -0,0 +1,11 @@
#include "util.h"
#include <time.h>
unsigned long get_tick_count()
{
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
return (ts.tv_sec * 1000 + ts.tv_nsec / 1000000);
}