1 Commits
Author SHA1 Message Date
urbanjo98912 ffdd2439dd deleted useless comments 2025-12-15 08:44:07 +01:00
2 changed files with 4 additions and 13 deletions

No files matched your search

+2 -4
View File
@@ -16,9 +16,7 @@ static void dublicateRandomEntry (unsigned int *numbers, unsigned int len)
if (numbers && len > 2) if (numbers && len > 2)
{ {
unsigned int dubIndx = rand() % (len - 1); unsigned int dubIndx = rand() % (len - 1);
unsigned int copyIndx; unsigned int copyIndx = rand() % len;
copyIndx = rand() % len;
numbers[len - 1] = numbers[dubIndx]; numbers[len - 1] = numbers[dubIndx];
@@ -69,7 +67,7 @@ unsigned int *createNumbers(unsigned int len)
// Duplicate one random entry // Duplicate one random entry
dublicateRandomEntry(numbers, len); dublicateRandomEntry(numbers, len);
clearTree(root); //Notwendigkeit muss noch restlichem Code entnommen werden clearTree(root);
return numbers; return numbers;
} }
+2 -9
View File
@@ -1,12 +1,6 @@
#include "timer.h" #include "timer.h"
#ifdef __linux__ #if __APPLE__
// Defines strict posix compliance for CLOCK_MONOTONIC
#define _POSIX_C_SOURCE 199309L
#include <time.h>
#endif
#if __APPLE__ || __linux__
#include <sys/time.h> #include <sys/time.h>
static struct timespec start = {0, 0}; static struct timespec start = {0, 0};
@@ -27,8 +21,7 @@ double stopTimer()
double measuredSeconds = (double)delta_us / 1000000.; double measuredSeconds = (double)delta_us / 1000000.;
if (start.tv_nsec > 0) if(start.tv_nsec > 0) {
{
start.tv_nsec = 0; start.tv_nsec = 0;
start.tv_sec = 0; start.tv_sec = 0;
} }