Kokkos Node API and Local Linear Algebra Kernels Version of the Day
Tsqr_TrivialTimer.cpp
00001 #include <Tsqr_TrivialTimer.hpp>
00002 #include <Tsqr_verifyTimerConcept.hpp>
00003 
00004 namespace TSQR {
00005 
00006   TrivialTimer::TrivialTimer (const std::string& theName, bool doStart) :
00007     name_ (theName), isRunning_ (false)
00008   {
00009     if (doStart)
00010       start();
00011   }
00012 
00013   void 
00014   TrivialTimer::verifyConcept()
00015   {
00016     TSQR::Test::verifyTimerConcept<TrivialTimer> ();
00017   }
00018 
00019   void
00020   TrivialTimer::start (bool reset) 
00021   {
00022     isRunning_ = true;
00023   }
00024 
00025   double 
00026   TrivialTimer::stop () 
00027   { 
00028     isRunning_ = false;
00029     ++counter_;
00030     return static_cast<double> (counter_);
00031   }
00032 
00033 } // namespace TSQR
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends