Merge branch 'fix-changelogs' into 'main'
[tor.git] / src / lib / wallclock / approx_time.h
blob661e2a33489c08244a0525e8a188be5fad59981e
1 /* Copyright (c) 2003-2004, Roger Dingledine
2 * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
3 * Copyright (c) 2007-2021, The Tor Project, Inc. */
4 /* See LICENSE for licensing information */
6 /**
7 * \file approx_time.h
8 * \brief Header for approx_time.c
9 **/
11 #ifndef TOR_APPROX_TIME_H
12 #define TOR_APPROX_TIME_H
14 #include <time.h>
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) */
25 #endif /* !defined(TOR_APPROX_TIME_H) */