Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Jowett <[email protected]>
  • Loading branch information
Alan Jowett committed Nov 11, 2024
1 parent 38e3c90 commit 40dd829
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/crab_utils/stats.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,25 +48,25 @@ class CrabStats {
static unsigned get(const std::string& n);
static unsigned uset(const std::string& n, unsigned v);
static void count(const std::string& name) {
if (enabled) {
if constexpr (enabled) {
++(*counters)[name];
}
}
static void count_max(const std::string& name, unsigned v);

/* stop watch */
static void start(const std::string& name) {
if (enabled) {
if constexpr (enabled) {
(*sw)[name].start();
}
}
static void stop(const std::string& name) {
if (enabled) {
if constexpr (enabled) {
(*sw)[name].stop();
}
}
static void resume(const std::string& name) {
if (enabled) {
if constexpr (enabled) {
(*sw)[name].resume();
}
}
Expand Down

0 comments on commit 40dd829

Please sign in to comment.