mirror of
https://git.wownero.com/wownero/onion-wownero-blockchain-explorer.git
synced 2024-08-15 00:33:12 +00:00
xmreg::pause_execution added to tools.
This commit is contained in:
parent
16fce8188c
commit
38d893057e
2 changed files with 18 additions and 0 deletions
|
@ -1388,7 +1388,22 @@ get_human_readable_timestamp(uint64_t ts)
|
|||
return std::string(buffer);
|
||||
}
|
||||
|
||||
void
|
||||
pause_execution(uint64_t no_seconds, const string& text)
|
||||
{
|
||||
|
||||
cout << "\nPausing " << text
|
||||
<< " for " << no_seconds << " seconds: "
|
||||
<< flush;
|
||||
|
||||
for (size_t i = 0; i < no_seconds; ++i)
|
||||
{
|
||||
cout << "." << flush;
|
||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||
}
|
||||
|
||||
cout << endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -333,6 +333,9 @@ calc_median(It it_begin, It it_end)
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
pause_execution(uint64_t no_seconds, const string& text = "now");
|
||||
|
||||
}
|
||||
|
||||
#endif //XMREG01_TOOLS_H
|
||||
|
|
Loading…
Reference in a new issue