mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-11 03:53:22 +02:00
Split up util.cpp/h
Split up util.cpp/h into: - string utilities (hex, base32, base64): no internal dependencies, no dependency on boost (apart from foreach) - money utilities (parsesmoney, formatmoney) - time utilities (gettime*, sleep, format date): - and the rest (logging, argument parsing, config file parsing) The latter is basically the environment and OS handling, and is stripped of all utility functions, so we may want to rename it to something else than util.cpp/h for clarity (Matt suggested osinterface). Breaks dependency of sha256.cpp on all the things pulled in by util.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "sync.h"
|
||||
#include "ui_interface.h"
|
||||
#include "util.h"
|
||||
#include "utilstrencodings.h"
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
@@ -35,6 +36,11 @@ int64_t GetAdjustedTime()
|
||||
return GetTime() + GetTimeOffset();
|
||||
}
|
||||
|
||||
static int64_t abs64(int64_t n)
|
||||
{
|
||||
return (n >= 0 ? n : -n);
|
||||
}
|
||||
|
||||
void AddTimeData(const CNetAddr& ip, int64_t nTime)
|
||||
{
|
||||
int64_t nOffsetSample = nTime - GetTime();
|
||||
|
Reference in New Issue
Block a user