VirtualBox

Changeset 99127 in vbox for trunk


Ignore:
Timestamp:
Mar 23, 2023 8:23:39 AM (22 months ago)
Author:
vboxsync
Message:

Revert r156473 as clock_gettime_nsec_np(CLOCK_UPTIME_RAW) is apparently doing the same as we do just not as efficient (calls mach_timebase_info() every time)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/darwin/time-darwin.cpp

    r99108 r99127  
    5454*   Global Variables                                                                                                             *
    5555*********************************************************************************************************************************/
    56 #if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
    5756static struct mach_timebase_info    g_Info = { 0, 0 };
    5857static double                       g_rdFactor = 0.0;
     
    7776    }
    7877}
    79 #endif
    8078
    8179
     
    8684DECLINLINE(uint64_t) rtTimeGetSystemNanoTS(void)
    8785{
    88 #if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
    8986    /* Lazy init. */
    9087    if (RT_UNLIKELY(g_Info.denom == 0 && !g_fFailedToGetTimeBaseInfo))
     
    104101    return (uint64_t)tv.tv_sec  * RT_NS_1SEC_64
    105102         + (uint64_t)(tv.tv_usec * RT_NS_1US);
    106 #else
    107     return clock_gettime_nsec_np(CLOCK_UPTIME_RAW);
    108 #endif
    109103}
    110104
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette