Changeset 2623 in vbox for trunk/src/VBox/VMM
- Timestamp:
- May 14, 2007 1:47:13 PM (18 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PDMDevice.cpp
r2597 r2623 128 128 static DECLCALLBACK(void) pdmR3DevHlp_STAMRegisterV(PPDMDEVINS pDevIns, void *pvSample, STAMTYPE enmType, STAMVISIBILITY enmVisibility, STAMUNIT enmUnit, const char *pszDesc, const char *pszName, va_list args); 129 129 static DECLCALLBACK(int) pdmR3DevHlp_CritSectInit(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, const char *pszName); 130 static DECLCALLBACK(PRTTIMESPEC) pdmR3DevHlp_U CTNow(PPDMDEVINS pDevIns, PRTTIMESPEC pTime);130 static DECLCALLBACK(PRTTIMESPEC) pdmR3DevHlp_UTCNow(PPDMDEVINS pDevIns, PRTTIMESPEC pTime); 131 131 132 132 static DECLCALLBACK(PVM) pdmR3DevHlp_GetVM(PPDMDEVINS pDevIns); … … 311 311 pdmR3DevHlp_PDMQueueCreate, 312 312 pdmR3DevHlp_CritSectInit, 313 pdmR3DevHlp_U CTNow,313 pdmR3DevHlp_UTCNow, 314 314 0, 315 315 0, … … 396 396 pdmR3DevHlp_PDMQueueCreate, 397 397 pdmR3DevHlp_CritSectInit, 398 pdmR3DevHlp_U CTNow,398 pdmR3DevHlp_UTCNow, 399 399 0, 400 400 0, … … 2337 2337 2338 2338 2339 /** @copydoc PDMDEVHLP::pfnU CTNow */2340 static DECLCALLBACK(PRTTIMESPEC) pdmR3DevHlp_U CTNow(PPDMDEVINS pDevIns, PRTTIMESPEC pTime)2341 { 2342 PDMDEV_ASSERT_DEVINS(pDevIns); 2343 LogFlow(("pdmR3DevHlp_U CTNow: caller='%s'/%d: pTime=%p\n",2339 /** @copydoc PDMDEVHLP::pfnUTCNow */ 2340 static DECLCALLBACK(PRTTIMESPEC) pdmR3DevHlp_UTCNow(PPDMDEVINS pDevIns, PRTTIMESPEC pTime) 2341 { 2342 PDMDEV_ASSERT_DEVINS(pDevIns); 2343 LogFlow(("pdmR3DevHlp_UTCNow: caller='%s'/%d: pTime=%p\n", 2344 2344 pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, pTime)); 2345 2345 2346 pTime = TMR3U CTNow(pDevIns->Internal.s.pVMHC, pTime);2347 2348 LogFlow(("pdmR3DevHlp_U CTNow: caller='%s'/%d: returns %RU64\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, RTTimeSpecGetNano(pTime)));2346 pTime = TMR3UTCNow(pDevIns->Internal.s.pVMHC, pTime); 2347 2348 LogFlow(("pdmR3DevHlp_UTCNow: caller='%s'/%d: returns %RU64\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, RTTimeSpecGetNano(pTime))); 2349 2349 return pTime; 2350 2350 } -
trunk/src/VBox/VMM/TM.cpp
r2611 r2623 358 358 359 359 /* 360 * Configure real world time (U CT).361 */ 362 rc = CFGMR3QueryS64(pCfgHandle, "U CTOffset", &pVM->tm.s.offUCT);360 * Configure real world time (UTC). 361 */ 362 rc = CFGMR3QueryS64(pCfgHandle, "UTCOffset", &pVM->tm.s.offUTC); 363 363 if (rc == VERR_CFGM_VALUE_NOT_FOUND) 364 pVM->tm.s.offU CT= 0; /* ns */364 pVM->tm.s.offUTC = 0; /* ns */ 365 365 else if (VBOX_FAILURE(rc)) 366 366 return VMSetError(pVM, rc, RT_SRC_POS, 367 N_("Configuration error: Failed to querying 64-bit integer value \"U CTOffset\". (%Vrc)"), rc);367 N_("Configuration error: Failed to querying 64-bit integer value \"UTCOffset\". (%Vrc)"), rc); 368 368 369 369 /* … … 1739 1739 1740 1740 /** 1741 * Get the real world U CTtime adjusted for VM lag.1741 * Get the real world UTC time adjusted for VM lag. 1742 1742 * 1743 1743 * @returns pTime. … … 1745 1745 * @param pTime Where to store the time. 1746 1746 */ 1747 TMR3DECL(PRTTIMESPEC) TMR3U CTNow(PVM pVM, PRTTIMESPEC pTime)1747 TMR3DECL(PRTTIMESPEC) TMR3UTCNow(PVM pVM, PRTTIMESPEC pTime) 1748 1748 { 1749 1749 RTTimeNow(pTime); 1750 1750 RTTimeSpecSubNano(pTime, pVM->tm.s.offVirtualSync - pVM->tm.s.offVirtualSyncGivenUp); 1751 RTTimeSpecAddNano(pTime, pVM->tm.s.offU CT);1751 RTTimeSpecAddNano(pTime, pVM->tm.s.offUTC); 1752 1752 return pTime; 1753 1753 } -
trunk/src/VBox/VMM/TMInternal.h
r2611 r2623 363 363 } aVirtualSyncCatchUpPeriods[TM_MAX_CATCHUP_PERIODS]; 364 364 365 /** The U CToffset in ns.365 /** The UTC offset in ns. 366 366 * This is *NOT* for converting UTC to local time. It is for converting real 367 * world U CT time to VM UCTtime. This feature is indented for doing date367 * world UTC time to VM UTC time. This feature is indented for doing date 368 368 * testing of software and similar. 369 * @todo Implement warpdrive on U CT. */370 int64_t offU CT;369 * @todo Implement warpdrive on UTC. */ 370 int64_t offUTC; 371 371 372 372 /** Timer queues for the different clock types - R3 Ptr */
Note:
See TracChangeset
for help on using the changeset viewer.