mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-18 09:02:14 +11:00
🔥 "#include <chrono>"
This commit is contained in:
parent
5f74e0ce12
commit
09408ae800
1 changed files with 8 additions and 10 deletions
4
main.cpp
4
main.cpp
|
|
@ -1,5 +1,4 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <chrono>
|
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
@ -94,8 +93,7 @@ int main(int argc, char **argv)
|
||||||
const unsigned long saving_freq = std::stoul(std::string(argv[2]));
|
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
|
if (saving_freq) //if saving frequency is 0 then auto saving is turned off
|
||||||
{
|
{
|
||||||
std::thread([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));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue