#include <iostream.h>

#include "timer.h"

int main() {
    timer t;
    t.start();
    sleep(1);
    t.pause();
    cout << t.elapsed() << endl;
    sleep(2);

    // test to read timer while it is running
    t.start();
    int const max = 2*1000*1000;
    for (int i; i < max; i++)
	if (i == max/2) cout << t.elapsed() << endl;
    t.pause();
    cout << t.elapsed() << endl;

    t.reset();
    cout << t.elapsed() << endl;
}
