9 lines
162 B
C
9 lines
162 B
C
|
#include <stddef.h>
|
||
|
#include <sys/time.h>
|
||
|
|
||
|
double dtime(void)
|
||
|
{
|
||
|
struct timeval tv;
|
||
|
gettimeofday(&tv, NULL);
|
||
|
return (double)tv.tv_sec + ((double)tv.tv_usec)/1e6;
|
||
|
}
|