@@ -22,34 +22,34 @@ ZEND_API time_t zend_time_real_get(void) {
2222}
2323
2424ZEND_API void zend_time_real_spec (struct timespec * ts ) {
25- #if defined(HAVE_CLOCK_GETTIME )
25+ #if defined(HAVE_CLOCK_GETTIME )
2626
27- (void ) clock_gettime (CLOCK_REALTIME , ts );
27+ (void ) clock_gettime (CLOCK_REALTIME , ts );
2828
29- #elif defined(HAVE_TIMESPEC_GET )
29+ #elif defined(HAVE_TIMESPEC_GET )
3030
31- (void ) timespec_get (ts , TIME_UTC );
31+ (void ) timespec_get (ts , TIME_UTC );
3232
33- #elif defined(HAVE_GETTIMEOFDAY )
33+ #elif defined(HAVE_GETTIMEOFDAY )
3434
35- struct timeval tv ;
36- (void ) gettimeofday (& tv , NULL );
37- zend_time_val2spec (tv , ts );
35+ struct timeval tv ;
36+ (void ) gettimeofday (& tv , NULL );
37+ zend_time_val2spec (tv , ts );
3838
39- #else
39+ #else
4040
41- ts -> tv_sec = zend_time_real_get ();
42- ts -> tv_nsec = 0 ;
41+ ts -> tv_sec = zend_time_real_get ();
42+ ts -> tv_nsec = 0 ;
4343
44- #endif
44+ #endif
4545}
4646
4747ZEND_API uint64_t zend_time_mono_fallback (void ) {
48- #if ZEND_HRTIME_AVAILABLE
49- return (uint64_t )zend_hrtime ();
50- #else
51- struct timespec ts ;
52- zend_time_real_spec (& ts );
53- return ((uint64_t ) ts .tv_sec * ZEND_NANO_IN_SEC ) + ts .tv_nsec ;
54- #endif
48+ #if ZEND_HRTIME_AVAILABLE
49+ return (uint64_t )zend_hrtime ();
50+ #else
51+ struct timespec ts ;
52+ zend_time_real_spec (& ts );
53+ return ((uint64_t ) ts .tv_sec * ZEND_NANO_IN_SEC ) + ts .tv_nsec ;
54+ #endif
5555}
0 commit comments