projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Introduce time units
[pulseview.git]
/
pv
/
util.hpp
diff --git
a/pv/util.hpp
b/pv/util.hpp
index f75c95721d9df142691d2f44b12db2a7ca7895ea..f13516508aa45da7050a1aef0b9dd14f803e98af 100644
(file)
--- a/
pv/util.hpp
+++ b/
pv/util.hpp
@@
-28,6
+28,11
@@
namespace pv {
namespace util {
namespace pv {
namespace util {
+enum TimeUnit {
+ Time = 1,
+ Samples = 2
+};
+
extern const int FirstSIPrefixPower;
/**
extern const int FirstSIPrefixPower;
/**
@@
-57,7
+62,8
@@
QString format_si_value(
* @return The formated value.
*/
QString format_time(
* @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,
+ bool sign = true);
/**
* Formats a given time value with a SI prefix so that the
/**
* Formats a given time value with a SI prefix so that the