approx_time.h 499 B

1234567891011121314151617181920
  1. /* Copyright (c) 2003-2004, Roger Dingledine
  2. * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
  3. * Copyright (c) 2007-2018, The Tor Project, Inc. */
  4. /* See LICENSE for licensing information */
  5. #ifndef TOR_APPROX_TIME_H
  6. #define TOR_APPROX_TIME_H
  7. #include <time.h>
  8. /* Cached time */
  9. #ifdef TIME_IS_FAST
  10. #define approx_time() time(NULL)
  11. #define update_approx_time(t) STMT_NIL
  12. #else
  13. time_t approx_time(void);
  14. void update_approx_time(time_t now);
  15. #endif /* defined(TIME_IS_FAST) */
  16. #endif