Fixed busy-wait in delete_files
This commit is contained in:
parent
8474e84997
commit
3b7e67a3dc
1 changed files with 3 additions and 1 deletions
|
|
@ -133,7 +133,9 @@ namespace fc {
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_deletion_task = schedule( [this]() { delete_files(); }, start_time + _interval_seconds,
|
uint64_t next_file = time_point::now().sec_since_epoch() / _interval_seconds + 1;
|
||||||
|
_deletion_task = schedule( [this]() { delete_files(); },
|
||||||
|
fc::time_point_sec( next_file * _interval_seconds),
|
||||||
"delete_files(3)" );
|
"delete_files(3)" );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue