/* LICENSE:
  =========================================================================
    CMPack'04 Source Code Release for OPEN-R SDK 1.1.5-r2 for ERS7
    Copyright (C) 2004 Multirobot Lab [Project Head: Manuela Veloso]
    School of Computer Science, Carnegie Mellon University
    All rights reserved.
  ========================================================================= */
#ifndef INCLUDED_Util_h
#define INCLUDED_Util_h

#include "../headers/system_config.h"
#include <string>
#include "BoundedQueue.h"
#include <sys/time.h>

using namespace std;

double mean(BoundedQueue<int> *q);
unsigned long mean(BoundedQueue<unsigned long> *q);
struct timeval *now();
#ifdef PLATFORM_APERIOS
string timetostring(unsigned long t);
//double timetodouble(long t);
#else
string timetostring(struct timeval* t);
double timetodouble(struct timeval* t);
#endif

struct timeval* stringtotime(string s);

#endif

