]> sigrok.org Git - pulseview.git/blobdiff - pv/util.hpp
Remove unused arguments from 'format_time()'
[pulseview.git] / pv / util.hpp
index f75c95721d9df142691d2f44b12db2a7ca7895ea..d59ad10eb804831f08c1b817bc4dd2deacdfc7ed 100644 (file)
 namespace pv {
 namespace util {
 
+enum TimeUnit {
+       Time = 1,
+       Samples = 2
+};
+
 extern const int FirstSIPrefixPower;
 
 /**
@@ -51,13 +56,12 @@ QString format_si_value(
  * @param prefix The number of the prefix, from 0 for 'femto' up to
  *   8 for 'giga'. If prefix is set to -1, the prefix will be calculated.
  * @param unit The unit of quantity.
- * @param precision The number of digits after the decimal separator.
- * @param sign Whether or not to add a sign also for positive numbers.
+ * @param precision The number of digits after the decimal separator or period (.).
  *
  * @return The formated value.
  */
 QString format_time(
-       double t, int prefix = -1, unsigned precision = 0, bool sign = true);
+       double t, int prefix = -1, TimeUnit unit = Time, unsigned precision = 0);
 
 /**
  * Formats a given time value with a SI prefix so that the