VirtualBox

Changeset 405 in vbox for trunk/src/VBox/Runtime/generic


Ignore:
Timestamp:
Jan 28, 2007 9:31:03 AM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
17976
Message:

We're better off using the generic timer implementation on darwin. I get 201 ticks max with the posix one, while the generic manages more than 430 and only fails on the 1ms interval test. (tried three tstTimer instances in parallel, no trouble)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/generic/timer-generic.cpp

    r403 r405  
    8282RTDECL(int) RTTimerCreate(PRTTIMER *ppTimer, unsigned uMilliesInterval, PFNRTTIMER pfnTimer, void *pvUser)
    8383{
    84     return RTTimerCreateEx(ppTimer, uMilliesInterval * UINT64_C(1000000), 0, pfnTimer, pvUser);
     84    int rc = RTTimerCreateEx(ppTimer, uMilliesInterval * UINT64_C(1000000), 0, pfnTimer, pvUser);
     85    if (RT_SUCCESS(rc))
     86    {
     87        rc = RTTimerStart(*ppTimer, 0);
     88        if (RT_SUCCESS(rc))
     89            return rc;
     90        int rc2 = RTTimerDestroy(*ppTimer); AssertRC(rc2);
     91        *ppTimer = NULL;
     92    }
     93    return rc;
    8594}
    8695
Note: See TracChangeset for help on using the changeset viewer.

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