VirtualBox

Changeset 72863 in vbox for trunk/src/VBox/Runtime/r3


Ignore:
Timestamp:
Jul 4, 2018 10:13:40 AM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
123408
Message:

IPRT: RTTimeProgramXxxx must all be derived from the nanosecond timestamp or we may get rounding errors. This happened when mixing the ring-0 formatted 'msprog' and 'timeprog' prefixes with ones from ring-3.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/init.cpp

    r71282 r72863  
    107107 */
    108108DECLHIDDEN(uint64_t)        g_u64ProgramStartNanoTS;
    109 
    110 /**
    111  * Program start microsecond TS.
    112  */
    113 DECLHIDDEN(uint64_t)        g_u64ProgramStartMicroTS;
    114 
    115 /**
    116  * Program start millisecond TS.
    117  */
    118 DECLHIDDEN(uint64_t)        g_u64ProgramStartMilliTS;
    119109
    120110/**
     
    470460
    471461    /*
    472      * Init the program start TSes.
     462     * Init the program start timestamp TS.
    473463     * Do that here to be sure that the GIP time was properly updated the 1st time.
    474464     */
    475465    g_u64ProgramStartNanoTS = RTTimeNanoTS();
    476     g_u64ProgramStartMicroTS = g_u64ProgramStartNanoTS / 1000;
    477     g_u64ProgramStartMilliTS = g_u64ProgramStartNanoTS / 1000000;
    478466
    479467    /*
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