doblespiel/timer.h

18 lines
396 B
C

#ifndef TIMER_H
#define TIMER_H
#include <time.h>
// Usage of time.h: clock() returns the number of clock ticks since program start. CLOCKS_PER_SECONDS represents the
// number of clock ticks per second.
// Starts the timer.
void startTimer();
// Returns the time in seconds since startTimer() was called.
double stopTimer();
struct timespec {
time_t tv_sec;
long tv_nsec;
};
#endif