include/corelib/ncbitime.hpp File Reference


Detailed Description

Defines: CTimeFormat - storage class for fime format.

CTime - standard Date/Time class to represent an absolute time. CTimeSpan - class to represents a relative time span. CTimeout - timeout interval for various I/O etc activity. CStopWatch - stop watch class to measure elasped time.

NOTE about CTime:

Definition in file ncbitime.hpp.

#include <corelib/ncbistd.hpp>

Include dependency graph for ncbitime.hpp:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  TDBTimeU
 Database format for time where day and time is unsigned 16 bit. More...
struct  TDBTimeI
 Database format for time where day and time is signed 32 bit. More...
class  CTimeFormat
 CTimeFormat --. More...
class  CTime
 CTime --. More...
struct  CTime::TData
class  CTimeSpan
 CTimeSpan. More...
class  CTimeout
 CTimeout -- Timeout interval. More...
class  CFastLocalTime
 CFastLocalTime --. More...
class  CStopWatch
 CStopWatch --. More...
class  CTimeException
 CTimeException --. More...

Defines

#define NCBI_TIME_BITFIELD(n)   : n
#define NCBI_TIME_EMPTY_BITFIELD   unsigned : 0;

Typedefs

typedef Int8 TSeconds
 Number of seconds.
typedef struct TDBTimeUTDBTimeUPtr
typedef struct TDBTimeITDBTimeIPtr

Functions

CTime GetFastLocalTime (void)
 Quick and dirty getter of local time.
void TuneupFastLocalTime (void)
CTime AddYear (const CTime &t, int years=1)
CTime AddMonth (const CTime &t, int months=1)
CTime AddDay (const CTime &t, int days=1)
CTime AddHour (const CTime &t, int hours=1)
CTime AddMinute (const CTime &t, int minutes=1)
CTime AddSecond (const CTime &t, long seconds=1)
CTime AddNanoSecond (const CTime &t, long nanoseconds=1)
CTime operator+ (const CTimeSpan &ts, const CTime &t)
CTime CurrentTime (CTime::ETimeZone tz=CTime::eLocal, CTime::ETimeZonePrecision tzp=CTime::eTZPrecisionDefault)
CTime Truncate (const CTime &t)
ostream & operator<< (ostream &os, const CStopWatch &sw)
 Dumps the current stopwatch time to an output stream.
ostream & operator<< (ostream &os, const CTime &t)
 Dumps the current CTime time to an output stream.

Variables

const long kNanoSecondsPerSecond = 1000000000
 Number of nanoseconds in one second.
const long kMicroSecondsPerSecond = 1000000
 Number of microseconds in one second.
const long kMilliSecondsPerSecond = 1000
 Number milliseconds in one second.


Define Documentation

#define NCBI_TIME_BITFIELD  )     : n
 

Definition at line 1121 of file ncbitime.hpp.

#define NCBI_TIME_EMPTY_BITFIELD   unsigned : 0;
 

Definition at line 1122 of file ncbitime.hpp.


Function Documentation

CTime AddDay const CTime t,
int  days = 1
[inline]
 

Definition at line 1796 of file ncbitime.hpp.

References CTime::AddDay().

CTime AddHour const CTime t,
int  hours = 1
[inline]
 

Definition at line 1803 of file ncbitime.hpp.

References CTime::AddHour().

CTime AddMinute const CTime t,
int  minutes = 1
[inline]
 

Definition at line 1810 of file ncbitime.hpp.

References CTime::AddMinute().

CTime AddMonth const CTime t,
int  months = 1
[inline]
 

Definition at line 1789 of file ncbitime.hpp.

References CTime::AddMonth().

CTime AddNanoSecond const CTime t,
long  nanoseconds = 1
[inline]
 

Definition at line 1824 of file ncbitime.hpp.

References CTime::AddNanoSecond().

CTime AddSecond const CTime t,
long  seconds = 1
[inline]
 

Definition at line 1817 of file ncbitime.hpp.

References CTime::AddSecond().

CTime AddYear const CTime t,
int  years = 1
[inline]
 

Definition at line 1782 of file ncbitime.hpp.

References CTime::AddYear().

CTime CurrentTime CTime::ETimeZone  tz = CTime::eLocal,
CTime::ETimeZonePrecision  tzp = CTime::eTZPrecisionDefault
[inline]
 

Definition at line 1841 of file ncbitime.hpp.

References CTime::eCurrent.

Referenced by CRandomRowSelector::InitRNG(), CGFFFormatter::Start(), CGFF3_Formatter::Start(), CRotatingLogStream::x_BackupName(), CSplignJob::x_CreateProjectItems(), CStartItem::x_SetDate(), and CBlockingQueue< TRequest >::x_WaitForPredicate().

CTime GetFastLocalTime void   ) 
 

Quick and dirty getter of local time.

Use global object of CFastLocalTime class to obtain time. See CFastLocalTime for details.

Definition at line 2963 of file ncbitime.cpp.

References s_FastLocalTime.

Referenced by BOOST_AUTO_TEST_CASE(), CDiagContext::GetNextHitID(), and SDiagMessage::GetTime().

CTime operator+ const CTimeSpan ts,
const CTime t
[inline]
 

Definition at line 1832 of file ncbitime.hpp.

References CTime::AddTimeSpan().

ostream& operator<< ostream &  os,
const CTime t
[inline]
 

Dumps the current CTime time to an output stream.

The time will be printed out using format returned by CTime::GetFormat().

Definition at line 1870 of file ncbitime.hpp.

References CTime::AsString().

ostream& operator<< ostream &  os,
const CStopWatch sw
[inline]
 

Dumps the current stopwatch time to an output stream.

The time will be printed out using format specified by CStopWatch::GetFormat().

Definition at line 1861 of file ncbitime.hpp.

References CStopWatch::AsString().

CTime Truncate const CTime t  )  [inline]
 

Definition at line 1851 of file ncbitime.hpp.

References CTime::Truncate().

Referenced by s_GetItem(), and CResultSet::x_CacheItems().

void TuneupFastLocalTime void   ) 
 

Definition at line 2969 of file ncbitime.cpp.

References s_FastLocalTime.


Generated on Mon Dec 7 00:13:14 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Mon Dec 07 16:21:20 2009 by modify_doxy.py rev. 173732