+
+ /**
+ * Runs the given Cob at some time after the specified number of
+ * milliseconds. (No guarantees exactly when.)
+ *
+ * Throws a std::system_error if an error occurs.
+ */
+ void runAfterDelay(
+ Func cob,
+ uint32_t milliseconds,
+ InternalEnum internal = InternalEnum::NORMAL);
+
+ /**
+ * @see tryRunAfterDelay for more details
+ *
+ * @return true iff the cob was successfully registered.
+ */
+ bool tryRunAfterDelay(
+ Func cob,
+ uint32_t milliseconds,
+ InternalEnum internal = InternalEnum::NORMAL);
+
+ protected:
+ void clearCobTimeouts();
+
+ private:
+ struct CobTimeouts;
+ std::unique_ptr<CobTimeouts> cobTimeouts_;