You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

40 lines
1.0 KiB

#ifndef __BASIC_TIMESTAMP_HEADER__
#define __BASIC_TIMESTAMP_HEADER__
#include <time.h>
#include <locale.h>
#define TIME_STAMP_PERCISION 1000 // 1000 = 1 second
class basicTimeStamp{
int m_iTimeZoneShift;
time_t m_lTimeStamp;
public:
basicTimeStamp();
basicTimeStamp( int LocalTimeZoneShift );
~basicTimeStamp();
public:
void setCurrent( void );
void setUTS( time_t TS );
void setLocal( time_t TS );
time_t getUTS( void );
time_t getLocal( void );
int getYear( int TZ=0 );
int getMonth( int TZ=0 );
int getHour( int TZ=0 );
int getMinutes( int TZ=0 );
int getSeconds( int TZ=0 );
basicTimeStamp & operator= (const basicTimeStamp &expr );
basicTimeStamp & operator= (const int &expr );
basicTimeStamp & operator- (const basicTimeStamp &expr );
basicTimeStamp & operator+ (const basicTimeStamp &expr );
basicTimeStamp & operator- (const int &expr );
basicTimeStamp & operator+ (const int &expr );
};
#endif