]> sigrok.org Git - pulseview.git/blobdiff - pv/util.h
SamplingBar: Use nicer time format in the tooltip.
[pulseview.git] / pv / util.h
index 1af3ce93ac5f7179e346dde7310b03f4d2249007..572bed31814e6bba0baa670027e1762f04b261c9 100644 (file)
--- a/pv/util.h
+++ b/pv/util.h
@@ -44,6 +44,15 @@ QString format_time(
        double t, unsigned int prefix,
        unsigned precision = 0, bool sign = true);
 
+/**
+ * Formats a given time value with a SI prefix so that the
+ * value is between 1 and 999.
+ * @param second The time value in seconds to format.
+ *
+ * @return The formated value.
+ */
+QString format_second(double second);
+
 } // namespace util
 } // namespace pv