Add Chassis POH Counter
Added 32-bit counter, which shows how many hours the system has been
running. The value is a cumulative one and includes all working hours
since production. If the chassis state is Powered-on, This will be
incremented by one for every hour. It won't get updated when the
chassis state is powered-off.
Resolves openbmc/openbmc#2979
Change-Id: I18e9bb571d1a6e401b25450168249f70891be665
Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
diff --git a/chassis_state_manager_main.cpp b/chassis_state_manager_main.cpp
index ce3a0d8..1870890 100644
--- a/chassis_state_manager_main.cpp
+++ b/chassis_state_manager_main.cpp
@@ -19,12 +19,7 @@
objPathInst.c_str());
bus.request_name(CHASSIS_BUSNAME);
-
- while (true)
- {
- bus.process_discard();
- bus.wait();
- }
+ manager.startPOHCounter();
return 0;
}