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.
This commit is contained in:
Wladimir J. van der Laan
2014-06-19 15:08:37 +02:00
parent 208bf5b9e0
commit 14f888ca80
13 changed files with 118 additions and 81 deletions

17
src/timedata.h Normal file
View File

@@ -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