hax/src/posix/time.c
/**
 * Retrieve the current realtime clock time.
 *   &returns: The time in nanoseconds.
 */
Retrieve the current realtime clock time.
&returns: The time in nanoseconds.
Retrieve the current realtime clock time . &returns : The time in nanoseconds .
int64_t sys_clock_realtime()
{
	struct timespec ts;
	if(clock_gettime(CLOCK_REALTIME, &ts) < 0)
		fatal("Failed to get current time (%d). %s.", errno, strerror(errno));
	return 1000000000 * (int64_t)ts.tv_sec + (int64_t)ts.tv_nsec;
}
int64_t sys_clock_realtime ( ) { struct timespec ts ; if ( clock_gettime ( CLOCK_REALTIME , & ts ) < 0 ) fatal ( " " , errno , strerror ( errno ) ) ; return 1000000000 * ( int64_t ) ts . tv_sec + ( int64_t ) ts . tv_nsec ; }
Retrieve the current realtime clock time.
Retrieve the current realtime clock time .