aboutsummaryrefslogtreecommitdiff
path: root/src/timedata.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-06-19 15:08:37 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2014-06-25 09:24:50 +0200
commit14f888ca804386b111b07e8988753d67f507ba30 (patch)
tree22193675a85be98cbc9030d973a388834803b80a /src/timedata.h
parent208bf5b9e0a86900bddf5722dc192c3262480e36 (diff)
Move network-time related functions to timedata.cpp/h
The network time-offset-mangement functions from util.cpp are moved to timedata.(cpp|h). This breaks the dependency of util on netbase.
Diffstat (limited to 'src/timedata.h')
-rw-r--r--src/timedata.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/timedata.h b/src/timedata.h
new file mode 100644
index 0000000000..0e7bdc2c1f
--- /dev/null
+++ b/src/timedata.h
@@ -0,0 +1,17 @@
+// Copyright (c) 2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_TIMEDATA_H
+#define BITCOIN_TIMEDATA_H
+
+#include <stdint.h>
+
+class CNetAddr;
+
+/* Functions to keep track of adjusted P2P time */
+int64_t GetTimeOffset();
+int64_t GetAdjustedTime();
+void AddTimeData(const CNetAddr& ip, int64_t nTime);
+
+#endif