File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -15,10 +15,15 @@ void UninterruptibleSleep(const std::chrono::microseconds& n);
15
15
/* *
16
16
* Helper to count the seconds of a duration.
17
17
*
18
- * All durations should be using std::chrono and calling this should generally be avoided in code. Though, it is still
19
- * preferred to an inline t.count() to protect against a reliance on the exact type of t.
18
+ * All durations should be using std::chrono and calling this should generally
19
+ * be avoided in code. Though, it is still preferred to an inline t.count() to
20
+ * protect against a reliance on the exact type of t.
21
+ *
22
+ * This helper is used to convert durations before passing them over an
23
+ * interface that doesn't support std::chrono (e.g. RPC, debug log, or the GUI)
20
24
*/
21
25
inline int64_t count_seconds (std::chrono::seconds t) { return t.count (); }
26
+ inline int64_t count_microseconds (std::chrono::microseconds t) { return t.count (); }
22
27
23
28
/* *
24
29
* DEPRECATED
You can’t perform that action at this time.
0 commit comments