PulseView  0.3.0
A Qt-based sigrok GUI
util.hpp File Reference
#include <cmath>
#include <boost/multiprecision/cpp_dec_float.hpp>
#include <QMetaType>
#include <QString>
Include dependency graph for util.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 pv
 
 pv::util
 

Typedefs

typedef boost::multiprecision::number< boost::multiprecision::cpp_dec_float< 24 >, boost::multiprecision::et_off > pv::util::Timestamp
 Timestamp type providing yoctosecond resolution. More...
 

Enumerations

enum  pv::util::TimeUnit { pv::util::TimeUnit::Time = 1, pv::util::TimeUnit::Samples = 2 }
 
enum  pv::util::SIPrefix {
  pv::util::SIPrefix::unspecified = -1, pv::util::SIPrefix::yocto, pv::util::SIPrefix::zepto, pv::util::SIPrefix::atto,
  pv::util::SIPrefix::femto, pv::util::SIPrefix::pico, pv::util::SIPrefix::nano, pv::util::SIPrefix::micro,
  pv::util::SIPrefix::milli, pv::util::SIPrefix::none, pv::util::SIPrefix::kilo, pv::util::SIPrefix::mega,
  pv::util::SIPrefix::giga, pv::util::SIPrefix::tera, pv::util::SIPrefix::peta, pv::util::SIPrefix::exa,
  pv::util::SIPrefix::zetta, pv::util::SIPrefix::yotta
}
 

Functions

int pv::util::exponent (SIPrefix prefix)
 Returns the exponent that corresponds to a given prefix. More...
 
QString pv::util::format_time_si (const Timestamp &t, SIPrefix prefix=SIPrefix::unspecified, unsigned precision=0, QString unit="s", bool sign=true)
 
QString pv::util::format_time_si_adjusted (const Timestamp &t, SIPrefix prefix, unsigned precision, QString unit, bool sign)
 
QString pv::util::format_time_minutes (const Timestamp &t, signed precision, bool sign)