TetaTricks/code/dtime.c

9 lines
182 B
C
Raw Normal View History

2021-08-25 16:18:34 +11:00
#include <stddef.h>
#include <sys/time.h>
2021-08-29 02:06:26 +11:00
#include "my-fifo.h"
2021-08-25 16:18:34 +11:00
double dtime(void)
{
struct timeval tv;
gettimeofday(&tv, NULL);
return (double)tv.tv_sec + ((double)tv.tv_usec)/1e6;
}