Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenlib/BLI_math_time.h')
-rw-r--r--source/blender/blenlib/BLI_math_time.h29
1 files changed, 27 insertions, 2 deletions
diff --git a/source/blender/blenlib/BLI_math_time.h b/source/blender/blenlib/BLI_math_time.h
index 671ec6f857f..52857773797 100644
--- a/source/blender/blenlib/BLI_math_time.h
+++ b/source/blender/blenlib/BLI_math_time.h
@@ -27,7 +27,10 @@
extern "C" {
#endif
-/************************ Time constants definitions***************************/
+/* -------------------------------------------------------------------- */
+/** \name Time Constants Definitions
+ * \{ */
+
#define SECONDS_IN_MILLISECONDS 0.001
#define SECONDS_IN_MINUTE 60.0
#define MINUTES_IN_HOUR 60.0
@@ -37,6 +40,20 @@ extern "C" {
#define SECONDS_IN_DAY (MINUTES_IN_DAY * SECONDS_IN_MINUTE)
#define SECONDS_IN_HOUR (MINUTES_IN_HOUR * SECONDS_IN_MINUTE)
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Time API
+ * \{ */
+
+/**
+ * Explode given time value expressed in seconds, into a set of days, hours, minutes, seconds
+ * and/or milliseconds (depending on which return parameters are not NULL).
+ *
+ * \note The smallest given return parameter will get the potential fractional remaining time
+ * value. E.g. if you give `seconds=90.0` and do not pass `r_seconds` and `r_milliseconds`,
+ * `r_minutes` will be set to `1.5`.
+ */
void BLI_math_time_seconds_decompose(double seconds,
double *r_days,
double *r_hours,
@@ -44,7 +61,15 @@ void BLI_math_time_seconds_decompose(double seconds,
double *r_seconds,
double *r_milliseconds);
-/**************************** Inline Definitions ******************************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Inline Definitions
+ * \{ */
+
+/* None. */
+
+/** \} */
#ifdef __cplusplus
}