attn: Add wait for power fault handling
Added a 10 second delay between checkstop detection and call to analyzer
so that power fault handler logic can intervene before analyzer begins
logging events.
Signed-off-by: Ben Tyner <ben.tyner@ibm.com>
Change-Id: I13d36e9fed35ff8af690a5f38bf4476027a4fea2
diff --git a/attn/attn_common.hpp b/attn/attn_common.hpp
index 938af36..ad93a0a 100644
--- a/attn/attn_common.hpp
+++ b/attn/attn_common.hpp
@@ -3,6 +3,9 @@
namespace attn
{
+// number of seconds to wait for power fault handling
+constexpr int POWER_FAULT_WAIT = 10;
+
/** @brief Attention handler return codes */
enum ReturnCodes
{
@@ -52,4 +55,11 @@
*/
bool recoverableErrors();
+/**
+ * @brief sleep for n-seconds
+ *
+ * @param[in] seconds number of seconds to sleep
+ */
+void sleepSeconds(const unsigned int seconds);
+
} // namespace attn