Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions TimeoutGuard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ namespace utility
wakeup.notify_all();
}

void TimeoutGuard::unwatch() {
touch();
idle.store( true );
wakeup.notify_all();
}

void TimeoutGuard::touch()
{
touched.store( clock::now() );
Expand Down
1 change: 1 addition & 0 deletions TimeoutGuard.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ namespace utility
TimeoutGuard & operator=( TimeoutGuard && ) = delete;

void watch();
void unwatch();
void touch();

private:
Expand Down