mirror of https://github.com/OISF/suricata
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
457 B
C
18 lines
457 B
C
16 years ago
|
#ifndef __UTIL_CLOCK_H__
|
||
|
#define __UTIL_CLOCK_H__
|
||
|
|
||
|
#include <time.h>
|
||
|
|
||
|
/* Feel free to add more macros */
|
||
|
|
||
|
#define CLOCK_INIT clock_t clo1, clo2; clo1 = clo2 = 0;
|
||
|
#define CLOCK_START clo1 = clock()
|
||
|
|
||
|
#define CLOCK_END clo2 = clock()
|
||
|
|
||
|
#define CLOCK_PRINT_SEC printf("Seconds spent: %.4fs\n", ((clo2 - clo1)/(double)CLOCKS_PER_SEC))
|
||
|
|
||
|
#define GET_CLOCK_END_SECS ((clo - clo1)/(double)CLOCKS_PER_SEC)
|
||
|
|
||
|
#endif /*__UTIL_CLOCK_H__ */
|