42-archive/libft/srcs/time/epoch.c
2017-09-01 19:29:17 +02:00

10 lines
159 B
C

#include "mytime.h"
size_t epoch_micro(void)
{
struct timeval tv;
if (gettimeofday(&tv, NULL))
return (0);
return (tv.tv_sec * 1000000 + tv.tv_usec);
}