diff src/core/wait.h @ 70:53b217afe122

doc: improve doxygen documentation
author David Demelier <markand@malikania.fr>
date Mon, 27 Jan 2020 14:13:49 +0100
parents 9435a53adab4
children
line wrap: on
line diff
--- a/src/core/wait.h	Mon Jan 27 13:31:24 2020 +0100
+++ b/src/core/wait.h	Mon Jan 27 14:13:49 2020 +0100
@@ -22,6 +22,30 @@
 /**
  * \file wait.h
  * \brief Wait action.
+ * \ingroup actions
+ *
+ * This module is meant to create a delayed action.
+ *
+ * Combined with \ref script.h, you can create a sequence of actions with
+ * delays between each.
+ *
+ * \code
+ * struct script script;
+ * struct action action;
+ *
+ * // Prepare the script.
+ * script_init(&script);
+ *
+ * // Add some actions to script using script_append.
+ * // ...
+ *
+ * // Wait one second delay before next action.
+ * wait_action(&(struct wait) { .delay = 1000 }, &action);
+ * script_append(&script, &action);
+ *
+ * // Add more actions after this delay.
+ * // ...
+ * \endcode
  */
 
 #include <stdbool.h>
@@ -32,14 +56,14 @@
  * \brief Wait action.
  */
 struct wait {
-	unsigned int delay;             /*!< (RW) Time to wait */
+	unsigned int delay;             /*!< (RW) Time to wait in milliseconds */
 	unsigned int elapsed;           /*!< (RO) Elapsed time */
 };
 
 /**
  * Start the wait action.
  *
- * This function is equivalent to w->elapsed = 0;
+ * This function is equivalent to `w->elapsed = 0`;
  *
  * \pre w != NULL
  * \param w the wait object