Remove unused members.

This commit is contained in:
Tetsuo Kiso 2012-02-26 13:58:48 +09:00
parent c62365b419
commit 0c24f7e10b
2 changed files with 0 additions and 44 deletions

View File

@ -17,57 +17,16 @@ void Timer::start(const char* msg)
{
// Print an optional message, something like "Starting timer t";
if (msg) TRACE_ERR( msg << std::endl);
// Return immediately if the timer is already running
if (m_is_running) return;
// Change timer status to running
m_is_running = true;
// Set the start time;
time(&m_start_time);
}
/***
* Turn the timer off and start it again from 0. Print an optional message.
*/
/*
inline void Timer::restart(const char* msg)
{
// Print an optional message, something like "Restarting timer t";
if (msg) TRACE_ERR( msg << std::endl;
// Set the timer status to running
running = true;
// Set the accumulated time to 0 and the start time to now
acc_time = 0;
start_clock = clock();
start_time = time(0);
}
*/
/***
* Stop the timer and print an optional message.
*/
/*
inline void Timer::stop(const char* msg)
{
// Print an optional message, something like "Stopping timer t";
check(msg);
// Recalculate and store the total accumulated time up until now
if (running) acc_time += elapsed_time();
running = false;
}
*/
void Timer::check(const char* msg)
{
// Print an optional message, something like "Checking timer t";
if (msg) TRACE_ERR( msg << " : ");
// TRACE_ERR( "[" << std::setiosflags(std::ios::fixed) << std::setprecision(2) << (running ? elapsed_time() : 0) << "] seconds\n");
TRACE_ERR( "[" << (m_is_running ? elapsed_time() : 0) << "] seconds\n");
}

View File

@ -39,8 +39,6 @@ public:
* Print an optional message.
*/
void start(const char* msg = 0);
// void restart(const char* msg = 0);
// void stop(const char* msg = 0);
/**
* Print out an optional message followed by the current timer timing.
@ -59,7 +57,6 @@ public:
inline std::ostream& operator<<(std::ostream& os, Timer& t)
{
//os << std::setprecision(2) << std::setiosflags(std::ios::fixed) << (t.running ? t.elapsed_time() : 0);
os << (t.m_is_running ? t.elapsed_time() : 0);
return os;
}