Main Page | Class Hierarchy | Class List | File List | Class Members

SST::Time Class Reference

64-bit time class convenient for protocol use. More...

#include <timer.h>

List of all members.

Public Member Functions

 Time (qint64 usecs)
 Time (const Time &other)
bool operator== (const Time &other) const
bool operator!= (const Time &other) const
bool operator< (const Time &other) const
bool operator> (const Time &other) const
bool operator<= (const Time &other) const
bool operator>= (const Time &other) const
Time since (const Time &other) const
 Find the amount time since some supposedly previous timestamp, or 0 if the 'previous' timestamp is actually later.

QString toString () const
 Convert to standard ASCII date/time representation.

QDateTime toQDateTime () const
 Convert to Qt's QDateTime class.

QByteArray encode () const

Static Public Member Functions

Time fromString (const QString &str)
 Convert from standard ASCII date/time representations.

Time fromQDateTime (const QDateTime &qdt)
 Convert from Qt's QDateTime class.

Time decode (const QByteArray &data)

Public Attributes

qint64 usecs
 Microseconds since the Unix Epoch.


Friends

class Timer


Detailed Description

64-bit time class convenient for protocol use.

Represents in a simple, easy-to-work-with 64-bit time format by counting microseconds since the Unix epoch. The current() method to check the system time supports time virtualization for protocol simulation purposes.


Member Function Documentation

Time Time::fromQDateTime const QDateTime &  qdt  )  [static]
 

Convert from Qt's QDateTime class.

Parameters:
qdt the QDateTime to convert.
Returns:
the resulting Time.

Time Time::fromString const QString &  str  )  [static]
 

Convert from standard ASCII date/time representations.

Parameters:
str a date/time string in any of the formats supported by Qt's QDateTime class.
Returns:
the resulting Time.

QDateTime Time::toQDateTime  )  const
 

Convert to Qt's QDateTime class.

Returns:
the resulting QDateTime.

QString Time::toString  )  const
 

Convert to standard ASCII date/time representation.

Uses Qt's QDateTime formatting mechanism.

Returns:
the resulting date/time string.


The documentation for this class was generated from the following files:
Generated on Wed Mar 28 11:48:05 2007 for SST by doxygen 1.3.4