~CWin32_TimeInit() { // get the OS platform ID DWORD nPlatformID = GetPlatformId(); // if we're on an NT kernel, reset the timer resolution if (nPlatformID == VER_PLATFORM_WIN32_NT) { ::timeEndPeriod(1); } }
CWin32_TimeInit() { // get the OS platform ID DWORD nPlatformID = GetPlatformId(); // if we're on an NT kernel, initialize timer resolution to 1ms if (nPlatformID == VER_PLATFORM_WIN32_NT) { ::timeBeginPeriod(1); } // initialize the base time m_nBaseTime = ::timeGetTime(); //determine our precision scales for the units we support LARGE_INTEGER Frequency; QueryPerformanceFrequency(&Frequency); m_fPrecisionScaleS = (Frequency.QuadPart == 0) ? 1.0 : 1.0 / (double)Frequency.QuadPart; m_fPrecisionScaleMS = (Frequency.QuadPart == 0) ? 1.0 : 1000.0 / (double)(Frequency.QuadPart); }
void CreateAggregatorDlg::accept() { const QString name = GetName(); QString errorMsg(""); if (!name.isNull() && !name.isEmpty()) { // Get current selected patform in combobox. It could differ from active one. int platformId = GetPlatformId(); HierarchyTreePlatformNode* paltfromNode = dynamic_cast<HierarchyTreePlatformNode*>(HierarchyTreeController::Instance()->GetTree().GetNode(platformId)); if(paltfromNode && !paltfromNode->IsAggregatorOrScreenNamePresent(name)) { if(LibraryController::Instance()->IsControlNameExists(name)) { errorMsg = "Please fill aggregator name field with unique value.\r\n The same name with any of library controls is forbidden."; } else { QDialog::accept(); } } else { errorMsg = "Please fill aggregator name field with unique value.\r\n The same name with any of screen is forbidden."; } } else { errorMsg = "Please fill aggregator name field with value. It can't be empty."; } if(!errorMsg.isEmpty()) { QMessageBox msgBox; msgBox.setText(errorMsg); msgBox.exec(); } }