tobicore  7.0.0
 All Classes Functions Variables Typedefs Enumerator Friends Groups Pages
TCTimestamp Class Reference

Timestamp class. More...

#include <tobicore/TCTimestamp.hpp>

+ Collaboration diagram for TCTimestamp:

Public Member Functions

 TCTimestamp (void)
 Constructor.
virtual ~TCTimestamp (void)
 Destructor.
virtual void Unset (void)
 Invalidates the timestamp.
virtual bool IsSet (void)
 Check if the timestamp is valid.
virtual void Tic (void)
 Tics the timestamp.
virtual double Toc (TCTimeval *timestamp)
 Tocs the timestamp.
virtual double Toc (void)
 Tocs the timestamp.
virtual void Get (std::string *timestamp) const
 Timestamp getter (as string)
virtual bool Set (const std::string &timestamp)
 Timestamp setter (as string)
virtual void Set (const TCTimeval *timestamp)
 Timestamp setter.

Public Attributes

TCTimeval timestamp
 Timestamp.

Detailed Description

Timestamp class.

Definition at line 30 of file TCTimestamp.hpp.

Member Function Documentation

void TCTimestamp::Get ( std::string *  timestamp) const
virtual

Timestamp getter (as string)

Writes a stringified representation of the timestamp

  • timestamp Stringified timestamp representation
Examples:
tcblock.cpp.

Definition at line 58 of file TCTimestamp.cpp.

+ Here is the caller graph for this function:

bool TCTimestamp::IsSet ( void  )
virtual

Check if the timestamp is valid.

Returns
True if valid, false otherwise
Examples:
tcblock.cpp.

Definition at line 38 of file TCTimestamp.cpp.

bool TCTimestamp::Set ( const std::string &  timestamp)
virtual

Timestamp setter (as string)

Reads a stringified representation of the timestamp

  • timestamp Stringified timestamp representation
    Returns
    True if stringified representation is valid
Examples:
tcblock.cpp.

Definition at line 68 of file TCTimestamp.cpp.

+ Here is the caller graph for this function:

void TCTimestamp::Set ( const TCTimeval *  timestamp)
virtual

Timestamp setter.

From external timestamp

  • timestamp Reference to external timestamp

Definition at line 75 of file TCTimestamp.cpp.

void TCTimestamp::Tic ( void  )
virtual

Tics the timestamp.

Tic is like starting a stopwatch timer

Examples:
tcblock.cpp.

Definition at line 42 of file TCTimestamp.cpp.

+ Here is the caller graph for this function:

double TCTimestamp::Toc ( TCTimeval *  timestamp)
virtual

Tocs the timestamp.

Measures the difference between the external timestamp and the instance.

  • timestamp External timestamp
    Returns
    Time difference in milliseconds
Examples:
tcblock.cpp.

Definition at line 46 of file TCTimestamp.cpp.

double TCTimestamp::Toc ( void  )
virtual

Tocs the timestamp.

Toc is like checking how long a stopwatch timer has been running

Returns
Time difference in milliseconds

Definition at line 54 of file TCTimestamp.cpp.


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