diff options
Diffstat (limited to 'src/util/time.h')
-rw-r--r-- | src/util/time.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/util/time.h b/src/util/time.h index c69f604dc6..2c0e3d83f6 100644 --- a/src/util/time.h +++ b/src/util/time.h @@ -6,6 +6,8 @@ #ifndef BITCOIN_UTIL_TIME_H #define BITCOIN_UTIL_TIME_H +#include <compat.h> + #include <chrono> #include <stdint.h> #include <string> @@ -57,4 +59,9 @@ std::string FormatISO8601DateTime(int64_t nTime); std::string FormatISO8601Date(int64_t nTime); int64_t ParseISO8601DateTime(const std::string& str); +/** + * Convert milliseconds to a struct timeval for e.g. select. + */ +struct timeval MillisToTimeval(int64_t nTimeout); + #endif // BITCOIN_UTIL_TIME_H |