forked from ak-fortuna/fortuna
sfm: add get_write_interval() const member func.
This commit is contained in:
parent
b8f76886eb
commit
8b9fbe1e1e
@ -48,6 +48,11 @@ auto SeedFileManager::do_stuff() -> void {
|
|||||||
do_task.thread_pls(config.write_interval, [this] { write_seed_file(); });
|
do_task.thread_pls(config.write_interval, [this] { write_seed_file(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto SeedFileManager::get_write_interval() const -> std::chrono::seconds {
|
||||||
|
std::unique_lock<std::recursive_mutex> ul(mtx);
|
||||||
|
return this->config.write_interval;
|
||||||
|
}
|
||||||
|
|
||||||
auto SeedFileManager::seed_file_exists() const -> bool {
|
auto SeedFileManager::seed_file_exists() const -> bool {
|
||||||
std::lock_guard<std::recursive_mutex> lg(mtx);
|
std::lock_guard<std::recursive_mutex> lg(mtx);
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@ public:
|
|||||||
|
|
||||||
auto is_job_running() const -> bool;
|
auto is_job_running() const -> bool;
|
||||||
auto do_stuff() -> void;
|
auto do_stuff() -> void;
|
||||||
|
auto get_write_interval() const -> std::chrono::seconds;
|
||||||
|
|
||||||
explicit SeedFileManager(std::shared_ptr<fortuna::accumulator::Accumulator>
|
explicit SeedFileManager(std::shared_ptr<fortuna::accumulator::Accumulator>
|
||||||
accumulator) noexcept;
|
accumulator) noexcept;
|
||||||
|
Loading…
Reference in New Issue
Block a user