summaryrefslogtreecommitdiff
path: root/src/lib/event_history.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-12-31 22:50:41 +0100
committerCarl Hetherington <cth@carlh.net>2025-12-31 22:50:41 +0100
commit34746766f79e5304ef4fa948e7e1d8a06bf8b816 (patch)
tree6c9ac1c408c4a166f086a84efd198dba304ad392 /src/lib/event_history.cc
parentf51e9c758a39932625a52ebecc9e3c6f8b807cfd (diff)
Add events count to EventHistory.
Diffstat (limited to 'src/lib/event_history.cc')
-rw-r--r--src/lib/event_history.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/event_history.cc b/src/lib/event_history.cc
index f68a6c9b9..b39a23d01 100644
--- a/src/lib/event_history.cc
+++ b/src/lib/event_history.cc
@@ -60,4 +60,15 @@ EventHistory::event()
if (int(_history.size()) > _size) {
_history.pop_back();
}
+
+ ++_events;
}
+
+
+int
+EventHistory::events() const
+{
+ boost::mutex::scoped_lock lock(_mutex);
+ return _events;
+}
+