From cd3eea4acbd9f6ca2d8a3f5c90c03fa9d69aca57 Mon Sep 17 00:00:00 2001 From: heck Date: Sat, 5 Oct 2024 23:26:57 +0200 Subject: [PATCH] utils: SWTimer add time_now to cb params --- src/utils.cc | 2 +- src/utils.hh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils.cc b/src/utils.cc index 3ecfe38..6411f63 100644 --- a/src/utils.cc +++ b/src/utils.cc @@ -110,7 +110,7 @@ namespace Heck { time_last_exec_ = time_now; if (callback_) { //todo: constexpr if metrics - callback_(); + callback_(time_now); } return true; } diff --git a/src/utils.hh b/src/utils.hh index 5e68f9c..f8d3d53 100644 --- a/src/utils.hh +++ b/src/utils.hh @@ -16,7 +16,7 @@ namespace Heck { namespace Heck { class SWTimer { public: - using Callback = std::function; + using Callback = std::function; void set_period(u32 time_units); void set_callback(const Callback& cb);