Changeset 44847 in vbox for trunk/src/VBox
- Timestamp:
- Feb 27, 2013 6:47:11 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 83996
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/TM.cpp
r44800 r44847 2620 2620 VMMR3_INT_DECL(PRTTIMESPEC) TMR3UtcNow(PVM pVM, PRTTIMESPEC pTime) 2621 2621 { 2622 /* Get a stable set of VirtualSync parameters before querying UTC. */ 2623 uint64_t offVirtualSync; 2624 uint64_t offVirtualSyncGivenUp; 2625 do 2626 { 2627 offVirtualSync = ASMAtomicReadU64(&pVM->tm.s.offVirtualSync); 2628 offVirtualSyncGivenUp = ASMAtomicReadU64((uint64_t volatile *)&pVM->tm.s.offVirtualSyncGivenUp); 2629 } while (ASMAtomicReadU64(&pVM->tm.s.offVirtualSync) != offVirtualSync); 2630 2631 Assert(offVirtualSync >= offVirtualSyncGivenUp); 2632 uint64_t const offLag = offVirtualSync - offVirtualSyncGivenUp; 2633 2622 2634 RTTimeNow(pTime); 2623 RTTimeSpecSubNano(pTime, ASMAtomicReadU64(&pVM->tm.s.offVirtualSync) - ASMAtomicReadU64((uint64_t volatile *)&pVM->tm.s.offVirtualSyncGivenUp));2635 RTTimeSpecSubNano(pTime, offLag); 2624 2636 RTTimeSpecAddNano(pTime, pVM->tm.s.offUTC); 2625 2637 return pTime;
Note:
See TracChangeset
for help on using the changeset viewer.