start of ctaphid

This commit is contained in:
Conor Patrick
2018-04-28 21:40:13 -04:00
parent 27aaadff86
commit f9d89dad4d
5 changed files with 185 additions and 8 deletions

10
time.c Normal file
View File

@@ -0,0 +1,10 @@
#include <sys/time.h>
#include <stdint.h>
uint64_t millis()
{
struct timeval te;
gettimeofday(&te, NULL); // get current time
uint64_t milliseconds = te.tv_sec*1000LL + te.tv_usec/1000; // calculate milliseconds
return milliseconds;
}