Motiv
Marvelous OTF2 Traces Interactive Visualizer
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
TimeUnit Struct Reference

Represents possible units on the time scale. More...

#include <TimeUnit.hpp>

Public Types

enum  Unit {
  NanoSecond , MicroSecond , MilliSecond , Second ,
  Minute , Hour
}
 

Public Member Functions

 TimeUnit (Unit unit)
 Constructs or implicitly converts a TimeUnit from a Unit. More...
 
 TimeUnit (QString unit)
 
QString str () const
 
double multiplier () const
 

Detailed Description

Represents possible units on the time scale.

Definition at line 29 of file TimeUnit.hpp.

Member Enumeration Documentation

◆ Unit

Enumerator
NanoSecond 

Unit of a nanosecond

MicroSecond 

Unit of a microsecond

MilliSecond 

Unit of a millisecond

Second 

Unit of a second

Minute 

Unit of a minute

Hour 

Unit of an hour

Definition at line 30 of file TimeUnit.hpp.

Constructor & Destructor Documentation

◆ TimeUnit() [1/2]

TimeUnit::TimeUnit ( TimeUnit::Unit  unit)

Constructs or implicitly converts a TimeUnit from a Unit.

Parameters
unitThe init

Definition at line 20 of file TimeUnit.cpp.

◆ TimeUnit() [2/2]

TimeUnit::TimeUnit ( QString  unit)
explicit

Construct TimeUnit from string.

Parameters
unitSI time string (e.g. ns, μs, s, h)

Definition at line 41 of file TimeUnit.cpp.

Member Function Documentation

◆ multiplier()

double TimeUnit::multiplier ( ) const
Returns
value for conversion between base representation (ns) and other units.

Definition at line 59 of file TimeUnit.cpp.

◆ str()

QString TimeUnit::str ( ) const

Turns TimeUnit into SI time format.

Returns
Unit as SI string

Definition at line 22 of file TimeUnit.cpp.


The documentation for this struct was generated from the following files: