Final update - fixed foreach, tests and benchmark
This commit is contained in:
1 parent
22e84db11a
commit
5f39eb011c
8 files changed
+841
-1197
No files matched your search
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* timer.h
|
||||
*
|
||||
* Creation Date: 12/04/2019
|
||||
*
|
||||
* Authors:
|
||||
* Leonardo Vencovsky (https://github.com/LeoVen)
|
||||
*
|
||||
* Simple timer macros.
|
||||
*/
|
||||
#include <time.h>
|
||||
|
||||
typedef struct timer_s
|
||||
{
|
||||
clock_t start;
|
||||
clock_t stop;
|
||||
double result;
|
||||
} timer_t;
|
||||
|
||||
#define TIMER_START(timer) \
|
||||
timer.start = clock();
|
||||
|
||||
#define TIMER_STOP(timer) \
|
||||
timer.stop = clock();
|
||||
|
||||
#define TIMER_CALC(timer) \
|
||||
timer.result = (double)(((timer.stop - timer.start) * 1000.0) / CLOCKS_PER_SEC);
|
||||
Reference in new issue
Block a user