Merge pull request #1543
19be7225 Add start_time to get_info methods and show uptime (Miguel Herranz)
This commit is contained in:
@@ -249,6 +249,8 @@ namespace cryptonote
|
||||
//-----------------------------------------------------------------------------------------------
|
||||
bool core::init(const boost::program_options::variables_map& vm, const cryptonote::test_options *test_options)
|
||||
{
|
||||
start_time = std::time(nullptr);
|
||||
|
||||
m_fakechain = test_options != NULL;
|
||||
bool r = handle_command_line(vm);
|
||||
|
||||
@@ -995,6 +997,11 @@ namespace cryptonote
|
||||
return m_target_blockchain_height;
|
||||
}
|
||||
//-----------------------------------------------------------------------------------------------
|
||||
std::time_t core::get_start_time() const
|
||||
{
|
||||
return start_time;
|
||||
}
|
||||
//-----------------------------------------------------------------------------------------------
|
||||
void core::graceful_exit()
|
||||
{
|
||||
raise(SIGTERM);
|
||||
|
||||
Reference in New Issue
Block a user