#include <prcore/prcore.hpp>
using namespace prcore;

#include <sys/time.h>
#include <unistd.h>

// note..

// should implement some kind of performance timer


static struct timeval start;
static struct timeval now;

Timer::Timer()
{
  gettimeofday(&start,NULL);
  
}

Timer::~Timer()
{
}


void Timer::Reset()
{
}

float Timer::GetTime() const
{
  gettimeofday(&now,NULL);
   return (float)((now.tv_sec-start.tv_sec)*1000+(now.tv_usec-start.tv_usec)/1000.0f)/1000.f;

}

TimeInfo GetTimeInfo()
{
  TimeInfo time;
  time.year=0;
  time.month=0;
  time.day=0;
  time.hour=0;
  time.minute=0;
  time.second=0;
  time.milliseconds=0;

  return time;
}
