BTimeStampMs Class Reference

#include <BTimeStampMs.h>

List of all members.

Public Member Functions

 BTimeStampMs (BString str="")
 ~BTimeStampMs ()
void clear ()
 Clear the date/time.
void setNow ()
 Set the timeStamp to now.
BTimeStampMsaddMilliSeconds (int milliSeconds)
 Add the given number of milli seconds. This should be less that a year.
BTimeStampMssubMilliSeconds (int milliSeconds)
 Add the given number of milli seconds. This should be less that a year.
BTimeStampMsaddSeconds (int seconds)
 Add the given number of seconds. This should be less that a year.
BTimeStampMssubSeconds (int seconds)
 Subtract the given number of seconds. This should be less that a year.
uint32_t getYearSeconds ()
 Get number of seconds within the year.
uint64_t getYearMilliSeconds ()
 Get number of seconds within the year.
BString getString (BString separator="T")
 Get the time as an ISO date/time string.
BString getStringNoMs (BString separator="T")
 Get the time as an ISO date/time string with no ms.
BError setString (BString dateTime)
 Set the time from an ISO date/time.
BString getDurationString (BString separator="T")
 Get the time as an ISO date/time string but with month's and days starting from 0.
BString getDurationStringNoMs (BString separator="T")
 Get the time as an ISO date/time string but with month's and days starting from 0 with no ms.
BError setDurationString (BString dateTime)
 Set the time from an ISO date/time string but with month's and days starting from 0.
BString getStringRaw ()
void getDate (int &year, int &mon, int &day)
 Get the year, month and day.
int compare (const BTimeStampMs &timeStamp)
 Compare two dates.
int operator> (const BTimeStampMs &timeStamp)
int operator>= (const BTimeStampMs &timeStamp)
int operator< (const BTimeStampMs &timeStamp)
int operator<= (const BTimeStampMs &timeStamp)

Static Public Member Functions

static int isLeap (int year)
static BUInt64 difference (BTimeStampMs t2, BTimeStampMs t1)

Public Attributes

uint16_t year
 Year (2000 .. 3000).
uint16_t yday
 Day in year (0 .. 365).
uint16_t hour
 Hour (0 .. 23).
uint16_t minute
 Minute (0 .. 59).
uint16_t second
 Second (0 .. 59).
uint16_t milliSecond
 MilliSecond (0 .. 999).
int32_t sampleNumber
 The sample number this time refers to.

Constructor & Destructor Documentation

BTimeStampMs::BTimeStampMs ( BString  str = ""  ) 
BTimeStampMs::~BTimeStampMs (  ) 

Member Function Documentation

BTimeStampMs & BTimeStampMs::addMilliSeconds ( int  milliSeconds  ) 

Add the given number of milli seconds. This should be less that a year.

BTimeStampMs & BTimeStampMs::addSeconds ( int  seconds  ) 

Add the given number of seconds. This should be less that a year.

void BTimeStampMs::clear (  ) 

Clear the date/time.

int BTimeStampMs::compare ( const BTimeStampMs timeStamp  ) 

Compare two dates.

BUInt64 BTimeStampMs::difference ( BTimeStampMs  t2,
BTimeStampMs  t1 
) [static]
void BTimeStampMs::getDate ( int &  year,
int &  mon,
int &  day 
)

Get the year, month and day.

BString BTimeStampMs::getDurationString ( BString  separator = "T"  ) 

Get the time as an ISO date/time string but with month's and days starting from 0.

BString BTimeStampMs::getDurationStringNoMs ( BString  separator = "T"  ) 

Get the time as an ISO date/time string but with month's and days starting from 0 with no ms.

BString BTimeStampMs::getString ( BString  separator = "T"  ) 

Get the time as an ISO date/time string.

BString BTimeStampMs::getStringNoMs ( BString  separator = "T"  ) 

Get the time as an ISO date/time string with no ms.

BString BTimeStampMs::getStringRaw (  ) 
uint64_t BTimeStampMs::getYearMilliSeconds (  ) 

Get number of seconds within the year.

uint32_t BTimeStampMs::getYearSeconds (  ) 

Get number of seconds within the year.

int BTimeStampMs::isLeap ( int  year  )  [static]
int BTimeStampMs::operator< ( const BTimeStampMs timeStamp  )  [inline]
int BTimeStampMs::operator<= ( const BTimeStampMs timeStamp  )  [inline]
int BTimeStampMs::operator> ( const BTimeStampMs timeStamp  )  [inline]
int BTimeStampMs::operator>= ( const BTimeStampMs timeStamp  )  [inline]
BError BTimeStampMs::setDurationString ( BString  dateTime  ) 

Set the time from an ISO date/time string but with month's and days starting from 0.

void BTimeStampMs::setNow (  ) 

Set the timeStamp to now.

BError BTimeStampMs::setString ( BString  dateTime  ) 

Set the time from an ISO date/time.

BTimeStampMs & BTimeStampMs::subMilliSeconds ( int  milliSeconds  ) 

Add the given number of milli seconds. This should be less that a year.

BTimeStampMs & BTimeStampMs::subSeconds ( int  seconds  ) 

Subtract the given number of seconds. This should be less that a year.


Member Data Documentation

Hour (0 .. 23).

MilliSecond (0 .. 999).

Minute (0 .. 59).

The sample number this time refers to.

Second (0 .. 59).

Day in year (0 .. 365).

Year (2000 .. 3000).


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

Generated on 12 Mar 2012 for LibBeamApi by  doxygen 1.6.1