SF2 C++ FRC Class Library
Sensor Fusion Framework (SF2) for FRC
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Timestamp Class Reference
Inheritance diagram for Timestamp:
IQuantity

Public Types

enum  TimestampResolution { Second, Millisecond, Microsecond, Nanosecond }
 

Public Member Functions

 Timestamp (Timestamp &ts_copy)
 
 Timestamp (long timestamp, TimestampResolution resolution)
 
 Timestamp (double seconds, TimestampResolution resolution)
 
long getTimestamp ()
 
void setTimestamp (long new_timestamp)
 
void setResolution (TimestampResolution r)
 
TimestampResolution getResolution ()
 
long getNanoseconds ()
 
long getMicroseconds ()
 
long getMilliseconds ()
 
double getSeconds ()
 
void fromSeconds (double seconds)
 
bool getPrintableString (vector< string > &printable_string)
 
bool getContainedQuantities (vector< IQuantity * > &quantities)
 
bool getContainedQuantityNames (vector< string > &quantity_names)
 

Public Attributes

long timestamp
 
TimestampResolution resolution
 

Static Public Attributes

static const long MILLISECONDS_PER_SECOND = 1000
 
static const long MICROSECONDS_PER_SECOND = MILLISECONDS_PER_SECOND * 1000
 
static const long NANOSECONDS_PER_SECOND = MICROSECONDS_PER_SECOND * 1000
 
static const long NANOSECONDS_PER_MICROSECOND = 1000
 
static const long MICROSECONDS_PER_MILLISECOND = 1000
 
static const long NANOSECONDS_PER_MILLISECOND = NANOSECONDS_PER_MICROSECOND * 1000
 

The documentation for this class was generated from the following file: