This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "two_second_dirty_bit.h" | |
| #include <chrono> | |
| #include <iostream> | |
| #include <shared_mutex> | |
| bool two_second_dirty_bit::is_set() const | |
| { | |
| std::shared_lock lock(mutex_); // Use shared lock to allow concurrent reads | |
| return dirty_bit_.load(); // Returns true if the timer is running | |
| } |