Simple test program for the C++ timer class
#include <iostream>
#include <unistd.h>
#include "Timer.h"
std::cout << "Sleeping 2 seconds" << std::endl;
sleep(2);
std::cout <<
"Sleep lasted for " << test.
ElapsedTime() <<
" seconds." << std::endl;
std::cout << "Sleeping 1 second" << std::endl;
sleep(1);
std::cout <<
"Sleep lasted for " << test.
ElapsedTime() <<
" seconds." << std::endl;
std::cout <<
"Cumulative time is " << test.
CumulativeTime() <<
" seconds." << std::endl;
std::cout << "Reseting" << std::endl;
std::cout << "Sleeping 2 seconds" << std::endl;
sleep(2);
std::cout <<
"Sleep lasted for " << test.
ElapsedTime() <<
" seconds." << std::endl;
std::cout <<
"Cumulative time is " << test.
CumulativeTime() <<
" seconds." << std::endl;
}