mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-16 16:12:14 +11:00
🔥 "using namespace std::chrono;"
This commit is contained in:
parent
ab41a7ed46
commit
b0ce1acb56
1 changed files with 9 additions and 9 deletions
18
main.cpp
18
main.cpp
|
|
@ -14,7 +14,6 @@
|
|||
//threads of cpu
|
||||
#include <sys/sysinfo.h>
|
||||
|
||||
using namespace std::chrono;
|
||||
using namespace drogon;
|
||||
|
||||
void SaveSig(int s)
|
||||
|
|
@ -95,14 +94,15 @@ int main(int argc, char **argv)
|
|||
const unsigned long saving_freq = std::stoul(std::string(argv[2]));
|
||||
if (saving_freq) //if saving frequency is 0 then auto saving is turned off
|
||||
{
|
||||
std::thread([saving_freq]() {
|
||||
while (1)
|
||||
{
|
||||
std::this_thread::sleep_for(std::chrono::minutes(saving_freq));
|
||||
std::cout << "Saving " << std::time(0) << "...\n"
|
||||
<< Bank::Save();
|
||||
}
|
||||
})
|
||||
std::thread([saving_freq]()
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
std::this_thread::sleep_for(std::chrono::minutes(saving_freq));
|
||||
std::cout << "Saving " << std::time(0) << "...\n"
|
||||
<< Bank::Save();
|
||||
}
|
||||
})
|
||||
.detach();
|
||||
}
|
||||
} //destroying setup variables
|
||||
|
|
|
|||
Loading…
Reference in a new issue