diff options
author | Birte Kristina Friesel <birte.friesel@uos.de> | 2025-01-17 09:34:47 +0100 |
---|---|---|
committer | Birte Kristina Friesel <birte.friesel@uos.de> | 2025-01-17 09:34:47 +0100 |
commit | 24dea071574167bcad2d553f6b6bc24f40ccbb48 (patch) | |
tree | fb21b3c4b855e09f4a79b4c1bfab1c7f4966cc97 /SpMV/support/timer.h | |
parent | b4d38f56de51e5ac7c2c813b420e9f6d42abc2e6 (diff) |
SpMV: indent -linux
Diffstat (limited to 'SpMV/support/timer.h')
-rw-r--r-- | SpMV/support/timer.h | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/SpMV/support/timer.h b/SpMV/support/timer.h index 66e9842..7367b11 100644 --- a/SpMV/support/timer.h +++ b/SpMV/support/timer.h @@ -6,22 +6,25 @@ #include <sys/time.h> typedef struct Timer { - struct timeval startTime; - struct timeval endTime; + struct timeval startTime; + struct timeval endTime; } Timer; -static void startTimer(Timer* timer) { - gettimeofday(&(timer->startTime), NULL); +static void startTimer(Timer *timer) +{ + gettimeofday(&(timer->startTime), NULL); } -static void stopTimer(Timer* timer) { - gettimeofday(&(timer->endTime), NULL); +static void stopTimer(Timer *timer) +{ + gettimeofday(&(timer->endTime), NULL); } -static double getElapsedTime(Timer timer) { - return ((double) ((timer.endTime.tv_sec - timer.startTime.tv_sec) - + (timer.endTime.tv_usec - timer.startTime.tv_usec)/1.0e6)); +static double getElapsedTime(Timer timer) +{ + return ((double)((timer.endTime.tv_sec - timer.startTime.tv_sec) + + (timer.endTime.tv_usec - + timer.startTime.tv_usec) / 1.0e6)); } #endif - |