Merge pull request #22563 from marcelofg55/osx_usec_fix

Fix OS X get_ticks_usec return value after #22424
This commit is contained in:
Fabio Alessandrelli 2018-09-30 18:55:13 +02:00 committed by GitHub
commit 204d39b297
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -74,7 +74,7 @@ static void _setup_clock() {
kern_return_t ret = mach_timebase_info(&info); kern_return_t ret = mach_timebase_info(&info);
ERR_EXPLAIN("OS CLOCK IS NOT WORKING!"); ERR_EXPLAIN("OS CLOCK IS NOT WORKING!");
ERR_FAIL_COND(ret != 0); ERR_FAIL_COND(ret != 0);
_clock_scale = (double)info.numer / (double)info.denom; _clock_scale = ((double)info.numer / (double)info.denom) / 1000.0;
_clock_start = mach_absolute_time() * _clock_scale; _clock_start = mach_absolute_time() * _clock_scale;
} }
#else #else