# include <Timer.h>
# include <iostream>
# include <cmath>
using namespace Alice;

Timer::Timer()
{
};

Timer::~Timer()
{

};

void
Timer::printTime( std::ostream& out, double seconds )
{
  double secs = std::floor(seconds);
  double centisecs = std::floor((seconds-secs)*100.0 + .5 );
  double minutes = std::floor(secs/60.0);
  secs -= 60.0*minutes;
  double hours = std::floor(minutes/60.0);
  minutes -= 60.0 * hours;
  out<<hours<<":";
  if (minutes < 9.5)
    out<<"0";
  out<<minutes<<":";
  if (secs < 9.5)
    out<<"0";
  out<<secs<<".";
  if (centisecs < 9.5)
    out<<"0";
  out<<centisecs;
};
