//+------------------------------------------------------------------------ // // Microsoft Windows // Copyright (C) Microsoft Corporation, 1993. // // File: bm_noise.cxx // // Contents: output class for benchmark results // // Classes: CNoiseTest // // History: 30-June-93 t-martig Created // //-------------------------------------------------------------------------- #include #pragma hdrstop #include TCHAR *CNoiseTest::Name () { return TEXT("Noise Test"); } SCODE CNoiseTest::Setup (CTestInput *pInput) { CTestBase::Setup(pInput); // get iteration count m_ulIterations = pInput->GetIterations(Name(), TEST_MAX_ITERATIONS); INIT_RESULTS(m_ulNoiseTime); return S_OK; } SCODE CNoiseTest::Run () { CStopWatch sw; int n; FILE *pfDump; char buffer[100]; int i; m_ulResolution = sw.Resolution(); sw.Reset(); Sleep (1000); m_ulSleep = sw.Read(); sw.Reset(); for (n=0; n<10000; n++); m_ulIdle = sw.Read(); for (ULONG iIter=0; iIter