From 4afee0981b81b09104bba9745d09795b85957f27 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Thu, 16 Jan 2025 08:04:02 +0100 Subject: BFS: indent -linux --- BFS/support/timer.h | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'BFS/support/timer.h') 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 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 -- cgit v1.2.3