diff options
author | Birte Kristina Friesel <birte.friesel@uos.de> | 2025-05-23 16:28:17 +0200 |
---|---|---|
committer | Birte Kristina Friesel <birte.friesel@uos.de> | 2025-05-23 16:28:35 +0200 |
commit | fa6c70a44fc56cc50370e57c460dd61e8f127b51 (patch) | |
tree | 91269761966dccea80a2931542db5a3648f66e18 /SpMV/support/timer.h | |
parent | 2e3a43c12df8115fc859248adb14b87e08becb77 (diff) |
SpMV: Add AspectC++ support
Diffstat (limited to 'SpMV/support/timer.h')
-rw-r--r-- | SpMV/support/timer.h | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/SpMV/support/timer.h b/SpMV/support/timer.h deleted file mode 100644 index 7367b11..0000000 --- a/SpMV/support/timer.h +++ /dev/null @@ -1,30 +0,0 @@ - -#ifndef _TIMER_H_ -#define _TIMER_H_ - -#include <stdio.h> -#include <sys/time.h> - -typedef struct Timer { - struct timeval startTime; - struct timeval endTime; -} Timer; - -static void startTimer(Timer *timer) -{ - gettimeofday(&(timer->startTime), 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)); -} - -#endif |