Skip to content

Commit

Permalink
Merge pull request #75 from negram/fix-timer-on-macos
Browse files Browse the repository at this point in the history
Fixed clocks to microseconds conversion on Mac
  • Loading branch information
longxinH authored Dec 14, 2022
2 parents 676885b + 0198933 commit 41c5735
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extension/xhprof.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ double get_timebase_conversion()
mach_timebase_info_data_t info;
(void) mach_timebase_info(&info);

return (info.numer / info.denom) * 1000;
return info.denom * 1000. / info.numer;
#endif

return 1.0;
Expand Down

0 comments on commit 41c5735

Please sign in to comment.