Changeset 70008 in vbox for trunk/src/VBox/Additions/common/VBoxService/VBoxServiceTimeSync.cpp
- Timestamp:
- Dec 8, 2017 10:38:34 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceTimeSync.cpp
r69997 r70008 368 368 369 369 if (GetSystemTimeAdjustment(&g_dwWinTimeAdjustment, &g_dwWinTimeIncrement, &g_bWinTimeAdjustmentDisabled)) 370 vgsvcTimeSyncLog( 3, "vgsvcTimeSyncInit: Initially %ld (100ns) units per %ld (100 ns) units interval, disabled=%d\n",370 vgsvcTimeSyncLog(0, "vgsvcTimeSyncInit: Initially %ld (100ns) units per %ld (100 ns) units interval, disabled=%d\n", 371 371 g_dwWinTimeAdjustment, g_dwWinTimeIncrement, g_bWinTimeAdjustmentDisabled ? 1 : 0); 372 372 else … … 452 452 if (adjtime(&tv, NULL) == 0) 453 453 { 454 if (g_cVerbosity >= 1) 455 vgsvcTimeSyncLog(1, "vgsvcTimeSyncAdjust: adjtime by %RDtimespec\n", pDrift); 454 vgsvcTimeSyncLog(1, "vgsvcTimeSyncAdjust: adjtime by %RDtimespec\n", pDrift); 456 455 g_cTimeSyncErrors = 0; 457 456 return true; … … 477 476 return; 478 477 if (SetSystemTimeAdjustment(0, TRUE /* Periodic adjustments disabled. */)) 479 vgsvcTimeSyncLog( 3, "vgsvcTimeSyncCancelAdjust: Windows Time Adjustment is now disabled.\n");478 vgsvcTimeSyncLog(4, "vgsvcTimeSyncCancelAdjust: Windows Time Adjustment is now disabled.\n"); 480 479 else if (g_cTimeSyncErrors++ < 10) 481 480 VGSvcError("vgsvcTimeSyncCancelAdjust: SetSystemTimeAdjustment(,disable) failed, error=%u\n", GetLastError()); … … 503 502 g_cTimeSyncErrors = 0; 504 503 505 if (g_c Verbosity >= 1)504 if (g_cTimeSyncVerbosity >= 1) 506 505 { 507 506 char sz[64]; … … 510 509 #ifdef DEBUG 511 510 RTTIMESPEC Tmp; 512 if (g_cVerbosity >= 3) 513 vgsvcTimeSyncLog(3, " now %s\n", RTTimeToString(RTTimeExplode(&Time, RTTimeNow(&Tmp)), sz, sizeof(sz))); 511 vgsvcTimeSyncLog(3, " now %s\n", RTTimeToString(RTTimeExplode(&Time, RTTimeNow(&Tmp)), sz, sizeof(sz))); 514 512 #endif 515 513 } … … 592 590 && idNewSession != g_idTimeSyncSession) 593 591 { 594 vgsvcTimeSyncLog( 3, "vgsvcTimeSyncWorker: The VM session ID changed, forcing resync.\n");592 vgsvcTimeSyncLog(2, "vgsvcTimeSyncWorker: The VM session ID changed, forcing resync.\n"); 595 593 g_idTimeSyncSession = idNewSession; 596 594 TimeSyncSetThreshold = 0; … … 611 609 RTTIMESPEC AbsDrift = Drift; 612 610 RTTimeSpecAbsolute(&AbsDrift); 613 if (g_cVerbosity >= 3) 614 { 615 vgsvcTimeSyncLog(3, "vgsvcTimeSyncWorker: Host: %s (MinAdjust: %RU32 ms)\n", 616 RTTimeToString(RTTimeExplode(&Time, &HostNow), sz, sizeof(sz)), MinAdjust); 617 vgsvcTimeSyncLog(3, "vgsvcTimeSyncWorker: Guest: - %s => %RDtimespec drift\n", 618 RTTimeToString(RTTimeExplode(&Time, &GuestNow), sz, sizeof(sz)), &Drift); 619 } 611 612 vgsvcTimeSyncLog(3, "vgsvcTimeSyncWorker: Host: %s (MinAdjust: %RU32 ms)\n", 613 RTTimeToString(RTTimeExplode(&Time, &HostNow), sz, sizeof(sz)), MinAdjust); 614 vgsvcTimeSyncLog(3, "vgsvcTimeSyncWorker: Guest: - %s => %RDtimespec drift\n", 615 RTTimeToString(RTTimeExplode(&Time, &GuestNow), sz, sizeof(sz)), &Drift); 620 616 621 617 bool fSetTimeInThisLoop = false;
Note:
See TracChangeset
for help on using the changeset viewer.