mirror of
https://github.com/Expand-sys/CCash
synced 2026-03-22 20:47:10 +11:00
Update main.cpp
This commit is contained in:
parent
840669d910
commit
9799d75ce9
1 changed files with 2 additions and 2 deletions
4
main.cpp
4
main.cpp
|
|
@ -30,7 +30,7 @@ int main(int argc, char **argv)
|
||||||
const unsigned long saving_freq = std::stoul(argv[2]);
|
const unsigned long saving_freq = std::stoul(argv[2]);
|
||||||
if (saving_freq) //if saving frequency is 0 then auto saving is turned off
|
if (saving_freq) //if saving frequency is 0 then auto saving is turned off
|
||||||
{
|
{
|
||||||
std::thread([&argv, saving_freq]() {
|
std::thread([saving_freq]() {
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
std::this_thread::sleep_for(std::chrono::minutes(saving_freq));
|
std::this_thread::sleep_for(std::chrono::minutes(saving_freq));
|
||||||
|
|
@ -47,4 +47,4 @@ int main(int argc, char **argv)
|
||||||
app().loadConfigFile("../config.json").registerController(API).setThreadNum(std::stoul(argv[3])).enableRunAsDaemon().run();
|
app().loadConfigFile("../config.json").registerController(API).setThreadNum(std::stoul(argv[3])).enableRunAsDaemon().run();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue