aboutsummaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorame <[email protected]>2024-04-17 13:08:55 -0500
committerame <[email protected]>2024-04-17 13:08:55 -0500
commit98c89708fee01265ed3fa12cf8a658799467eb44 (patch)
tree04a7b35cff5b3950b0acfe0cd15717611c5a376c /src/util.h
parentda7ce8f2f3a6fdd9b992a26000ccc51cbf15926a (diff)
net speeds!
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index 30fa1f6..62cf80d 100644
--- a/src/util.h
+++ b/src/util.h
@@ -25,6 +25,12 @@
#define i_swap(A,B) double temp = A; A = B; B = temp;
#define lesser(A,B) ((A)>(B)?(B):(A))
#define inter(V,I) (I * ceil((double)V / I))
+#define time_start(name)\
+ clock_t _begin##name = clock();
+#define time_end(desc, name)\
+ clock_t _end##name = clock();\
+ printf("%s took %f\n",desc, (double)(_end##name - _begin##name) / CLOCKS_PER_SEC);
+
int gen_parse(char*,int, parray_t**);
#define p_fatal(M) _p_fatal(M, __LINE__, __FILE__, __func__ );