mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-03 20:54:41 +02:00
current_time in test.h
This commit is contained in:
@@ -997,11 +997,12 @@ static INLINE unsigned int my_psk_server_cb(WOLFSSL* ssl, const char* identity,
|
|||||||
#if !defined(WOLFSSL_MDK_ARM) && !defined(WOLFSSL_KEIL_TCP_NET)
|
#if !defined(WOLFSSL_MDK_ARM) && !defined(WOLFSSL_KEIL_TCP_NET)
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
static INLINE double current_time(void)
|
static INLINE double current_time(int reset)
|
||||||
{
|
{
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
gettimeofday(&tv, 0);
|
gettimeofday(&tv, 0);
|
||||||
|
(void)reset;
|
||||||
|
|
||||||
return (double)tv.tv_sec + (double)tv.tv_usec / 1000000;
|
return (double)tv.tv_sec + (double)tv.tv_usec / 1000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user