diff options
author | George Kadianakis <desnacked@riseup.net> | 2018-12-07 16:35:23 +0200 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2019-01-02 15:25:55 +0200 |
commit | 926fc93be5b6afab1a604ecd7c79aa6e8ae8a676 (patch) | |
tree | ad9b0bd2298f8035734d777f42b1333fb5cf990d /src/lib/defs | |
parent | dd04917851c23f16a11c0d2b0c62ea76c93c4c7d (diff) | |
download | tor-926fc93be5b6afab1a604ecd7c79aa6e8ae8a676.tar.gz tor-926fc93be5b6afab1a604ecd7c79aa6e8ae8a676.zip |
Concentrate all TOR_USEC_PER_SEC definitions in a single header file.
Co-authored-by: Mike Perry <mikeperry-git@torproject.org>
Diffstat (limited to 'src/lib/defs')
-rw-r--r-- | src/lib/defs/include.am | 1 | ||||
-rw-r--r-- | src/lib/defs/time.h | 23 |
2 files changed, 24 insertions, 0 deletions
diff --git a/src/lib/defs/include.am b/src/lib/defs/include.am index 48ee7f29fc..6a7f9114ea 100644 --- a/src/lib/defs/include.am +++ b/src/lib/defs/include.am @@ -2,4 +2,5 @@ noinst_HEADERS += \ src/lib/defs/dh_sizes.h \ src/lib/defs/digest_sizes.h \ + src/lib/defs/time.h \ src/lib/defs/x25519_sizes.h diff --git a/src/lib/defs/time.h b/src/lib/defs/time.h new file mode 100644 index 0000000000..762b23feab --- /dev/null +++ b/src/lib/defs/time.h @@ -0,0 +1,23 @@ +/* Copyright (c) 2001, Matej Pfajfar. + * Copyright (c) 2001-2004, Roger Dingledine. + * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson. + * Copyright (c) 2007-2018, The Tor Project, Inc. */ +/* See LICENSE for licensing information */ + +#ifndef TOR_TIME_DEFS_H +#define TOR_TIME_DEFS_H + +/** + * \file time.h + * + * \brief Definitions for timing-related constants. + **/ + +/** How many microseconds per second */ +#define TOR_USEC_PER_SEC (1000000) +/** How many nanoseconds per microsecond */ +#define TOR_NSEC_PER_USEC (1000) +/* How many nanoseconds per millisecond */ +#define TOR_NSEC_PER_MSEC (1000*1000) + +#endif |