Startcode angepasst, sodass nur eine Version für alle Plattformen existiert.

This commit is contained in:
2025-11-17 11:52:26 +01:00
parent d0f2ee5760
commit 85cb9514b2
61 changed files with 47 additions and 10151 deletions
+23
View File
@@ -0,0 +1,23 @@
#include <time.h>
#include "timer.h"
static clock_t startClocks = 0;
// Starts the timer.
void startTimer()
{
startClocks = clock();
}
// Returns the time in seconds since startTimer() was called.
double stopTimer()
{
double measuredSeconds = (clock() - (double)startClocks) / CLOCKS_PER_SEC;
if(startClocks > 0)
startClocks = 0;
else
measuredSeconds = -1;
return measuredSeconds;
}