Definition at line 86 of file Timer.h.
References mCpuTime, mFreq, mMode, and mStartTime.
Referenced by Impala::Persistency::SegmentationRepositoryInMonet::Add(), Impala::Persistency::KeyframesRepositoryInMonet::Add(), Impala::Persistency::ImageArchiveRepositoryInMonet::Add(), Impala::Persistency::FeatureTableRepositoryInMonet::Add(), Impala::Persistency::AnnotationTableRepositoryInMonet::Add(), Impala::Samples::MonetTest::CheckOneSimTable(), Impala::Visualization::VideoPlayer::DisplayFunc(), Impala::Application::Videolympics::VidolviWindow::DisplayFunc(), Impala::Application::ConceptLearnClient::DoActiveLearning(), Impala::Samples::MonetTest::DoCheckFeatures(), Impala::Samples::MonetTest::DoCheckFrameArchive(), Impala::Application::Im::DoGaussVec3UInt8(), Impala::Samples::MonetTest::DoInsertAnnotations(), Impala::Samples::MonetTest::DoInsertFeatures(), Impala::Samples::MonetTest::DoInsertFrameArchive(), Impala::Samples::MonetTest::DoInsertKeyframes(), Impala::Samples::MonetTest::DoInsertSegmentation(), Impala::Application::Im::DoMatrix(), Impala::Application::Im::DoNJetVec3UInt8(), Impala::Application::FileClient::DoPut(), Impala::Logger::EndAction(), Impala::Application::Client::ExampleRgbDataSrc(), Impala::Visualization::VideoPlayer::FBwd(), Impala::Core::ImageSet::Reporter::FinalReport(), Impala::Core::Trec::SearchTopic::GetElapsedTime(), Impala::Visualization::AppControlSrc::GetFpsString(), Impala::Visualization::AppControlDoc::GetIpsString(), Impala::Application::IDash::AppControlDossier::GetIpsString(), Impala::Core::VideoSet::ExportStills::HandleNewFile(), Impala::Visualization::SimilarityTableSetRank::HandleUpdate(), Impala::Visualization::RotorBrowser::RotorView::HasNextStill(), Impala::Core::Database::RawDataSet::Init(), Impala::Samples::MonetTest::InsertOneSimTable(), Impala::Logger::LogString(), Impala::Visualization::AppController::MainLoop(), Impala::Core::Matrix::MatNorm2DistInternal(), Impala::Visualization::VideoPlayer::Play(), Impala::Visualization::AppController::ProcessEvents(), Impala::Application::WindowTrecResult::ReadData(), Impala::Core::Stream::RgbDataSrcInfo::ReadInfo(), Impala::Visualization::RotorBrowser::RotorView::RotorView(), Impala::Job::Runner::RunJob(), Impala::Persistency::SimilarityTableSetRepositoryInMonet::SaveSim(), Impala::Core::ImageSet::ImageSet::SetImageSrc(), Impala::Util::TimePlot::SplitTime(), Impala::Util::ChannelServer::SplitTime(), SplitTimeStr(), Impala::Logger::StartAction(), Impala::Application::Client::TestBandwidth(), Impala::Application::Client::TestMpg(), and Impala::Application::Video::UpdateStatusBuf().
00087 {
00088 double val;
00089 #ifdef unix
00090 if (mMode == 0)
00091 {
00092 times(&mCpuTime);
00093 time_t splitUsrTime = mCpuTime.tms_utime - mUsrTime;
00094 time_t splitSysTime = mCpuTime.tms_stime - mSysTime;
00095 val = (double) (splitUsrTime + splitSysTime) / HZ;
00096 }
00097 else
00098 {
00099 struct timeval splitTime;
00100 gettimeofday(&splitTime, 0);
00101 val = (double) (splitTime.tv_sec - mStartTime.tv_sec);
00102 long uSec = splitTime.tv_usec - mStartTime.tv_usec;
00103 val += (double) uSec / 1000000;
00104 }
00105 #else
00106 if (mMode == 0)
00107 {
00108 clock_t splitCpuTime = clock() - mCpuTime;
00109 val = (double) splitCpuTime / CLOCKS_PER_SEC;
00110 }
00111 else
00112 {
00113 LARGE_INTEGER splitTimeStruct;
00114 QueryPerformanceCounter(&splitTimeStruct);
00115 LONGLONG splitTime = splitTimeStruct.HighPart;
00116 splitTime = splitTime << 32;
00117 splitTime |= splitTimeStruct.LowPart;
00118 splitTime -= mStartTime;
00119 val = (double) splitTime / mFreq;
00120 }
00121 #endif
00122 return val;
00123 }