Bitcoin Core
30.99.0
P2P Digital Currency
src
common
system.h
Go to the documentation of this file.
1
// Copyright (c) 2009-2010 Satoshi Nakamoto
2
// Copyright (c) 2009-present The Bitcoin Core developers
3
// Distributed under the MIT software license, see the accompanying
4
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
6
#ifndef BITCOIN_COMMON_SYSTEM_H
7
#define BITCOIN_COMMON_SYSTEM_H
8
9
#include <bitcoin-build-config.h>
// IWYU pragma: keep
10
11
#include <cstdint>
12
#include <optional>
13
#include <string>
14
15
// Application startup time (used for uptime calculation)
16
int64_t
GetStartupTime
();
17
18
void
SetupEnvironment
();
19
[[nodiscard]]
bool
SetupNetworking
();
20
#ifndef WIN32
21
std::string
ShellEscape
(
const
std::string& arg);
22
#endif
23
#if HAVE_SYSTEM
24
void
runCommand(
const
std::string& strCommand);
25
#endif
26
31
int
GetNumCores
();
32
36
std::optional<size_t>
GetTotalRAM
();
37
38
#endif
// BITCOIN_COMMON_SYSTEM_H
GetStartupTime
int64_t GetStartupTime()
Definition:
system.cpp:131
GetTotalRAM
std::optional< size_t > GetTotalRAM()
Return the total RAM available on the current system, if detectable.
Definition:
system.cpp:114
SetupNetworking
bool SetupNetworking()
Definition:
system.cpp:97
SetupEnvironment
void SetupEnvironment()
Definition:
system.cpp:65
GetNumCores
int GetNumCores()
Return the number of cores available on the current system.
Definition:
system.cpp:109
ShellEscape
std::string ShellEscape(const std::string &arg)
Definition:
system.cpp:43
Generated on Tue Oct 7 2025 20:00:29 for Bitcoin Core by
1.9.4