diff --git a/test/watchdog_test.cpp b/test/watchdog_test.cpp
index f846532..cb22a83 100644
--- a/test/watchdog_test.cpp
+++ b/test/watchdog_test.cpp
@@ -8,6 +8,7 @@
     EXPECT_FALSE(wdog->enabled());
     EXPECT_EQ(0, wdog->timeRemaining());
     EXPECT_FALSE(wdog->timerExpired());
+    EXPECT_FALSE(wdog->timerEnabled());
 }
 
 /** @brief Make sure that watchdog is started and enabled */
@@ -16,6 +17,7 @@
     // Enable and then verify
     EXPECT_TRUE(wdog->enabled(true));
     EXPECT_FALSE(wdog->timerExpired());
+    EXPECT_TRUE(wdog->timerEnabled());
 
     // Get the configured interval
     auto remaining = milliseconds(wdog->timeRemaining());
@@ -26,6 +28,7 @@
                 (remaining <= defaultInterval));
 
     EXPECT_FALSE(wdog->timerExpired());
+    EXPECT_TRUE(wdog->timerEnabled());
 }
 
 /** @brief Make sure that watchdog is started and enabled.
@@ -40,6 +43,8 @@
     EXPECT_FALSE(wdog->enabled(false));
     EXPECT_FALSE(wdog->enabled());
     EXPECT_EQ(0, wdog->timeRemaining());
+    EXPECT_FALSE(wdog->timerExpired());
+    EXPECT_FALSE(wdog->timerEnabled());
 }
 
 /** @brief Make sure that watchdog is started and enabled.
@@ -65,6 +70,7 @@
     EXPECT_TRUE((remaining >= expected - defaultDrift) &&
                 (remaining <= expected));
     EXPECT_FALSE(wdog->timerExpired());
+    EXPECT_TRUE(wdog->timerEnabled());
 }
 
 /** @brief Make sure that watchdog is started and enabled.
@@ -96,7 +102,8 @@
         }
     }
     EXPECT_TRUE(wdog->timerExpired());
-    EXPECT_EQ(expireTime.count() - 1 , count);
+    EXPECT_FALSE(wdog->timerEnabled());
+    EXPECT_EQ(expireTime.count() - 1, count);
 
     // Make sure secondary callback was not called.
     EXPECT_FALSE(expired);
@@ -138,5 +145,6 @@
     EXPECT_TRUE(wdog->enabled());
     EXPECT_EQ(0, wdog->timeRemaining());
     EXPECT_TRUE(wdog->timerExpired());
+    EXPECT_FALSE(wdog->timerEnabled());
     EXPECT_EQ(expireTime.count() - 1, count);
 }
diff --git a/watchdog.cpp b/watchdog.cpp
index b5cae66..12631a6 100644
--- a/watchdog.cpp
+++ b/watchdog.cpp
@@ -50,7 +50,7 @@
     uint64_t timeRemain = 0;
 
     // timer may have already expired and disabled
-    if (timer.getEnabled() != SD_EVENT_OFF)
+    if (timerEnabled())
     {
         // the one-shot timer does not expire yet
         auto expiry = duration_cast<milliseconds>(
@@ -71,7 +71,7 @@
 // Reset the timer to a new expiration value
 uint64_t Watchdog::timeRemaining(uint64_t value)
 {
-    if (timer.getEnabled() == SD_EVENT_OFF)
+    if (!timerEnabled())
     {
         // We don't need to update the timer because it is off
         return 0;
diff --git a/watchdog.hpp b/watchdog.hpp
index 757029c..e829699 100644
--- a/watchdog.hpp
+++ b/watchdog.hpp
@@ -93,6 +93,12 @@
             return timer.expired();
         }
 
+        /** @brief Tells if the timer is running or not */
+        inline bool timerEnabled() const
+        {
+            return timer.getEnabled() != SD_EVENT_OFF;
+        }
+
     private:
         /** @brief sdbusplus handle */
         sdbusplus::bus::bus& bus;
