diff options
author | Birte Kristina Friesel <birte.friesel@uos.de> | 2025-01-16 08:04:02 +0100 |
---|---|---|
committer | Birte Kristina Friesel <birte.friesel@uos.de> | 2025-01-16 08:04:02 +0100 |
commit | 4afee0981b81b09104bba9745d09795b85957f27 (patch) | |
tree | 90d41a977613b983c9bec29c10956d5af20dad24 /BFS/support/timer.h | |
parent | f0ec6cec9304ca0dd558cf8ec5777d0bb2da4307 (diff) |
BFS: indent -linux
Diffstat (limited to 'BFS/support/timer.h')
-rw-r--r-- | BFS/support/timer.h | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/BFS/support/timer.h b/BFS/support/timer.h index 466ad95..63b5567 100644 --- a/BFS/support/timer.h +++ b/BFS/support/timer.h @@ -6,22 +6,26 @@ #include <sys/time.h> typedef struct Timer { - struct timeval startTime[8]; - struct timeval stopTime[8]; - double time[8]; + struct timeval startTime[8]; + struct timeval stopTime[8]; + double time[8]; } Timer; -static void startTimer(Timer *timer, int i, int rep) { - if(rep == 0) { - timer->time[i] = 0.0; - } - gettimeofday(&timer->startTime[i], NULL); +static void startTimer(Timer *timer, int i, int rep) +{ + if (rep == 0) { + timer->time[i] = 0.0; + } + gettimeofday(&timer->startTime[i], NULL); } -static void stopTimer(Timer *timer, int i) { - gettimeofday(&timer->stopTime[i], NULL); - timer->time[i] += (timer->stopTime[i].tv_sec - timer->startTime[i].tv_sec) * 1000000.0 + - (timer->stopTime[i].tv_usec - timer->startTime[i].tv_usec); +static void stopTimer(Timer *timer, int i) +{ + gettimeofday(&timer->stopTime[i], NULL); + timer->time[i] += + (timer->stopTime[i].tv_sec - + timer->startTime[i].tv_sec) * 1000000.0 + + (timer->stopTime[i].tv_usec - timer->startTime[i].tv_usec); } #endif |