Tor  0.4.7.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-2021, The Tor Project, Inc. */
4 /* See LICENSE for licensing information */
5 
6 /**
7  * \file approx_time.h
8  * \brief Header for approx_time.c
9  **/
10 
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 /* !defined(TOR_APPROX_TIME_H) */
void update_approx_time(time_t now)
Definition: approx_time.c:41
time_t approx_time(void)
Definition: approx_time.c:32
Definitions for timing-related constants.