Changeset View
Changeset View
Standalone View
Standalone View
src/util/system.h
Show All 35 Lines | |||||
#include <utility> | #include <utility> | ||||
#include <vector> | #include <vector> | ||||
// Application startup time (used for uptime calculation) | // Application startup time (used for uptime calculation) | ||||
int64_t GetStartupTime(); | int64_t GetStartupTime(); | ||||
extern const char *const BITCOIN_CONF_FILENAME; | extern const char *const BITCOIN_CONF_FILENAME; | ||||
/** Translate a message to the native language of the user. */ | |||||
const extern std::function<std::string(const char *)> G_TRANSLATION_FUN; | |||||
/** | |||||
* Translation function. | |||||
* If no translation function is set, simply return the input. | |||||
*/ | |||||
inline std::string _(const char *psz) { | |||||
return G_TRANSLATION_FUN ? (G_TRANSLATION_FUN)(psz) : psz; | |||||
} | |||||
void SetupEnvironment(); | void SetupEnvironment(); | ||||
bool SetupNetworking(); | bool SetupNetworking(); | ||||
template <typename... Args> bool error(const char *fmt, const Args &... args) { | template <typename... Args> bool error(const char *fmt, const Args &... args) { | ||||
LogPrintf("ERROR: %s\n", tfm::format(fmt, args...)); | LogPrintf("ERROR: %s\n", tfm::format(fmt, args...)); | ||||
return false; | return false; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 397 Lines • Show Last 20 Lines |