Add deferrable callbacks

Deferrable callbacks delay callback invocation until a
pre configured length of time has elapsed.  One example
scenario where deferrable callbacks help is to avoid
oscillation when testing a condition and making callbacks
frequently.

Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Change-Id: I180c99b57ec1c9bde4da76d947a026f809341c8a
diff --git a/src/templates/conditional.mako.cpp b/src/templates/conditional.mako.cpp
index 3cc9564..229b3d6 100644
--- a/src/templates/conditional.mako.cpp
+++ b/src/templates/conditional.mako.cpp
@@ -1,3 +1,10 @@
+% if c.defer:
+std::make_unique<DeferrableCallback<ConfigPropertyCallbacks, SDEventTimer>>(
+${indent(1)}ConfigPropertyCallbackGroups::get()[${c.graph}],
+${indent(1)}*ConfigConditions::get()[${c.condition}],
+${indent(1)}${c.defer})\
+% else:
 std::make_unique<ConditionalCallback<ConfigPropertyCallbacks>>(
 ${indent(1)}ConfigPropertyCallbackGroups::get()[${c.graph}],
 ${indent(1)}*ConfigConditions::get()[${c.condition}])\
+% endif\