VirtualBox

Changeset 46223 in vbox for trunk/src/VBox/Runtime/r0drv/nt


Ignore:
Timestamp:
May 22, 2013 5:18:47 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
85951
Message:

Must use same time source in user and kernel land otherwise we might get huge deltas between GIP time and system time.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/nt/time-r0drv-nt.cpp

    r44529 r46223  
    3636DECLINLINE(uint64_t) rtTimeGetSystemNanoTS(void)
    3737{
    38 #ifndef IPRT_TARGET_NT4
     38    /*
     39     * Note! The time source we use here must be exactly the same as in
     40     *       the ring-3 code!
     41     */
     42#if 0
     43# ifndef IPRT_TARGET_NT4
    3944    ULONGLONG InterruptTime = KeQueryInterruptTime();
    4045    return (uint64_t)InterruptTime * 100; /* The value is in 100ns, convert to ns units. */
    41 #else
     46# else
    4247    LARGE_INTEGER InterruptTime;
    4348    do
     
    4853
    4954    return (uint64_t)InterruptTime.QuadPart * 100;
     55# endif
     56#else
     57    LARGE_INTEGER Tick;
     58    KeQueryTickCount(&Tick);
     59    return (uint64_t)Tick.QuadPart * KeQueryTimeIncrement() * 100;
    5060#endif
    5161}
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