tor  0.4.1.0-alpha-dev
approx_time.h
Go to the documentation of this file.
1 /* Copyright (c) 2003-2004, Roger Dingledine
2  * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
3  * Copyright (c) 2007-2019, The Tor Project, Inc. */
4 /* See LICENSE for licensing information */
5 
11 #ifndef TOR_APPROX_TIME_H
12 #define TOR_APPROX_TIME_H
13 
14 #include <time.h>
15 
16 /* Cached time */
17 #ifdef TIME_IS_FAST
18 #define approx_time() time(NULL)
19 #define update_approx_time(t) STMT_NIL
20 #else
21 time_t approx_time(void);
22 void update_approx_time(time_t now);
23 #endif /* defined(TIME_IS_FAST) */
24 
25 #endif
void update_approx_time(time_t now)
Definition: approx_time.c:41
Definitions for timing-related constants.
time_t approx_time(void)
Definition: approx_time.c:32