@@ -127,8 +127,40 @@ namespace sofa::helper
127127class Record
128128{
129129public:
130+ /* *
131+ * @brief High-resolution timestamp of the timer event in clock ticks
132+ *
133+ * This timestamp records the number of clock ticks since some reference point (not absolute time).
134+ *
135+ * **Important usage note**: When converting to seconds, you should only use time differences (e.g., `time2 - time1`).
136+ * Absolute values of this type cannot be directly converted to seconds without knowing the reference point.
137+ */
130138 sofa::helper::system::thread::ctime_t time;
131- enum Type { RNONE, RBEGIN, REND, RSTEP_BEGIN, RSTEP_END, RSTEP, RVAL_SET, RVAL_ADD } type;
139+
140+ /* *
141+ * @enum Record::Type
142+ * @brief Type of record in the timer data.
143+ *
144+ * This enum defines the different types of records that can be stored in the timer data stream.
145+ * Each record type represents a specific timing operation or value tracking operation.
146+ *
147+ * @note The values are used to distinguish between different types of timer operations and value tracking operations.
148+ *
149+ * @{
150+ */
151+ enum Type {
152+ RNONE, // /< No record (used for initialization)
153+ RBEGIN, // /< Begin timer operation (e.g., when a timer starts)
154+ REND, // /< End timer operation (e.g., when a timer stops)
155+ RSTEP_BEGIN, // /< Begin of a step operation (e.g., when a step starts)
156+ RSTEP_END, // /< End of a step operation (e.g., when a step ends)
157+ RSTEP, // /< Step operation (e.g., when a step is executed)
158+ RVAL_SET, // /< Set a value operation (e.g., when a value is set)
159+ RVAL_ADD // /< Add to a value operation (e.g., when a value is added)
160+ };
161+ // / @}
162+
163+ Type type;
132164 std::string label;
133165 unsigned int id;
134166 unsigned int obj;
0 commit comments