eccovi il timer.h:
codice:
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
class Time{
int seconds;
public:
Time(int t){seconds=t;}
Time(char str[80]){seconds=atoi(t);}
Time(int min, int sec){}
void run();
}
e questo è il timer.cpp:
codice:
#include "Timer.h"
#include <cstdlib>
#include <ctime>
#include <iostream>
using namespace std;
void Time::run()
{
clock_t t1;
t1 = clock();
while((clock()/CLOCKS_PER_SEC - t1/CLOCKS_PER_SEC) < seconds);
cout<<"\a"<<"\t emmesso segnale acustico";
}