diff --git a/src/util-time.h b/src/util-time.h index d2de7cb8db..ba3c55d3f2 100644 --- a/src/util-time.h +++ b/src/util-time.h @@ -106,6 +106,13 @@ typedef struct { #define SCTIME_CMP_LTE(a, b) SCTIME_CMP((a), (b), <=) #define SCTIME_CMP_NEQ(a, b) SCTIME_CMP((a), (b), !=) +static inline SCTime_t SCTimeGetTime(void) +{ + struct timeval tv; + gettimeofday(&tv, NULL); + return SCTIME_FROM_TIMEVAL(&tv); +} + void TimeInit(void); void TimeDeinit(void);