hax/src/posix/time.c
/**
 * Retrieve the time in microseconds.
 *   &returns: The number of microseconds since 1970.
 */
Retrieve the time in microseconds.
&returns: The number of microseconds since 1970.
Retrieve the time in microseconds . &returns : The number of microseconds since 1970 .
int64_t sys_utime(void)
{
	struct timeval tv;
	if(gettimeofday(&tv, NULL) < 0)
		fatal("Failed to get current time (%d). %s.", errno, strerror(errno));
	return 1000000 * (int64_t)tv.tv_sec + (int64_t)tv.tv_usec;
}
int64_t sys_utime ( void ) { struct timeval tv ; if ( gettimeofday ( & tv , NULL ) < 0 ) fatal ( " " , errno , strerror ( errno ) ) ; return 1000000 * ( int64_t ) tv . tv_sec + ( int64_t ) tv . tv_usec ; }
Retrieve the time in microseconds.
Retrieve the time in microseconds .