1 #ifndef CORELIB__NCBITIME__HPP
2 #define CORELIB__NCBITIME__HPP
144 fFormat_Simple = (1 << 0),
149 fFormat_Ncbi = (1 << 1),
154 fMatch_Strict = (1 << 5),
159 fMatch_ShortTime = (1 << 6),
160 fMatch_ShortFormat = (1 << 7),
165 fMatch_Weak = fMatch_ShortTime | fMatch_ShortFormat,
171 fMatch_IgnoreSpaces = (1 << 8),
175 fConf_UTC = (1 << 9),
181 eNcbiSimple = fFormat_Simple,
182 eNcbi = fFormat_Ncbi,
193 eISO8601_YearMonth = 1,
195 eISO8601_DateTimeMin = 3,
196 eISO8601_DateTimeSec = 4,
197 eISO8601_DateTimeFrac = 5
227 void SetFormat(
const char* fmt, TFlags
flags = fDefault);
237 void SetFormat(
const string& fmt, TFlags
flags = fDefault);
244 const string& GetString(
void)
const;
251 TFlags GetFlags(
void)
const;
254 bool IsEmpty(
void)
const;
313 eCurrentTimeZone = -1
363 eTZPrecisionDefault =
eNone
370 eDaylightDefault = eAdjustDaylight
383 ETimeZone tz = eLocal,
384 ETimeZonePrecision tzp = eTZPrecisionDefault);
396 explicit CTime(time_t
t, ETimeZonePrecision tzp = eTZPrecisionDefault);
408 CTime(
const struct tm&
t, ETimeZonePrecision tzp = eTZPrecisionDefault);
433 CTime(
int year,
int month,
int day,
434 int hour = 0,
int minute = 0,
int second = 0,
long nanosecond = 0,
435 ETimeZone tz = eLocal,
436 ETimeZonePrecision tzp = eTZPrecisionDefault);
450 CTime(
int year,
int yearDayNumber,
451 ETimeZone tz = eLocal,
452 ETimeZonePrecision tzp = eTZPrecisionDefault);
473 ETimeZone tz = eLocal,
474 ETimeZonePrecision tzp = eTZPrecisionDefault);
495 CTime& operator= (
const string&
str);
504 CTime& SetTimeT(
const time_t
t);
513 time_t GetTimeT(
void)
const;
525 static void GetCurrentTimeT(time_t* sec,
long* nanosec = 0);
537 CTime& SetTimeTM(
const struct tm&
t);
543 struct tm GetTimeTM(void)
const;
582 CTime& SetCurrent(
void);
650 static int MonthNameToNum(
const string& month);
662 static string MonthNumToName(
int month, ENameFormat
format = eFull);
672 static int DayOfWeekNameToNum(
const string& day);
684 static string DayOfWeekNumToName(
int day, ENameFormat
format = eFull);
703 TSeconds out_tz = eCurrentTimeZone)
const;
706 operator string(
void)
const;
717 int Year(
void)
const;
723 int Month(
void)
const;
735 int Hour(
void)
const;
741 int Minute(
void)
const;
747 int Second(
void)
const;
755 long MilliSecond(
void)
const;
763 long MicroSecond(
void)
const;
771 long NanoSecond(
void)
const;
789 void SetYear(
int year);
802 void SetMonth(
int month);
814 void SetDay(
int day);
822 void SetHour(
int hour);
830 void SetMinute(
int minute);
838 void SetSecond(
int second);
846 void SetMilliSecond(
long millisecond);
854 void SetMicroSecond(
long microsecond);
862 void SetNanoSecond(
long nanosecond);
867 int YearDayNumber(
void)
const;
880 int YearWeekNumber(EDayOfWeek first_day_of_week = eSunday)
const;
888 int MonthWeekNumber(EDayOfWeek first_day_of_week = eSunday)
const;
894 int DayOfWeek(
void)
const;
899 int DaysInMonth(
void)
const;
906 CTime&
AddYear(
int years = 1, EDaylight adl = eDaylightDefault);
934 CTime&
AddDay(
int days = 1, EDaylight adl = eDaylightDefault);
945 CTime&
AddHour(
int hours = 1, EDaylight adl = eDaylightDefault);
956 CTime&
AddMinute(
int minutes = 1, EDaylight adl = eDaylightDefault);
1005 EDaylight adl = eDaylightDefault);
1066 int DiffWholeDays(
const CTime&
t)
const;
1069 double DiffDay(
const CTime&
t)
const;
1072 double DiffHour(
const CTime&
t)
const;
1075 double DiffMinute(
const CTime&
t)
const;
1081 double DiffNanoSecond(
const CTime&
t)
const;
1092 bool IsEmpty (
void)
const;
1095 bool IsEmptyDate (
void)
const;
1098 bool IsLeap (
void)
const;
1104 bool IsLocalTime (
void)
const;
1107 bool IsUniversalTime(
void)
const;
1115 bool IsDST(
void)
const;
1138 ETimeZone GetTimeZone(
void)
const;
1142 ETimeZone SetTimeZone(ETimeZone
val);
1146 ETimeZonePrecision GetTimeZonePrecision(
void)
const;
1149 ETimeZonePrecision SetTimeZonePrecision(ETimeZonePrecision
val);
1152 CTime GetLocalTime(
void)
const;
1155 CTime GetUniversalTime(
void)
const;
1162 CTime& ToLocalTime(
void);
1165 CTime& ToUniversalTime(
void);
1175 TSeconds TimeZoneOffset(
void)
const;
1179 string TimeZoneOffsetStr(
void);
1189 string TimeZoneName(
void);
1200 EErrAction err_action = eErr_Throw);
1204 CTime& x_SetTime(
const time_t*
t = 0);
1207 CTime& x_SetTimeMTSafe(
const time_t*
t = 0);
1211 void x_AdjustDay(
void);
1220 CTime& x_AdjustTime(
const CTime& from,
bool shift_time =
true);
1224 CTime& x_AdjustTimeImmediately(
const CTime& from,
bool shift_time =
true);
1227 bool x_NeedAdjustTime(
void)
const;
1232 CTime& x_AddHour(
int hours = 1, EDaylight daylight = eDaylightDefault,
1233 bool shift_time =
true);
1236 #if defined(NCBI_COMPILER_WORKSHOP) && defined(__x86_64) && NCBI_COMPILER_VERSION < 590
1240 # define NCBI_TIME_BITFIELD(n)
1241 # define NCBI_TIME_EMPTY_BITFIELD
1243 # define NCBI_TIME_BITFIELD(n) : n
1244 # define NCBI_TIME_EMPTY_BITFIELD unsigned : 0;
1290 :
CTime(eCurrent, tz)
1332 CTimeSpan(
long days,
long hours,
long minutes,
long seconds,
1333 long nanoseconds = 0);
1342 explicit CTimeSpan(
long seconds,
long nanoseconds = 0);
1381 ESign GetSign(
void)
const;
1431 operator string(
void)
const;
1452 fSS_Year = (1 << 0),
1453 fSS_Month = (1 << 1),
1455 fSS_Hour = (1 << 3),
1456 fSS_Minute = (1 << 4),
1457 fSS_Second = (1 << 5),
1458 fSS_Millisecond = (1 << 6),
1459 fSS_Microsecond = (1 << 7),
1460 fSS_Nanosecond = (1 << 8),
1461 fSS_Precision1 = (1 << 9),
1462 fSS_Precision2 = (1 << 10),
1463 fSS_Precision3 = (1 << 11),
1464 fSS_Precision4 = (1 << 12),
1465 fSS_Precision5 = (1 << 13),
1466 fSS_Precision6 = (1 << 14),
1467 fSS_Precision7 = (1 << 15),
1468 fSS_Smart = (1 << 16),
1469 fSS_PrecisionMask = 0x1FFFF,
1475 fSS_Round = (1 << 20),
1476 fSS_Trunc = (1 << 21),
1486 fSS_NoSkipZero = (1 << 22),
1487 fSS_SkipZero = (1 << 23),
1493 fSS_Short = (1 << 24),
1494 fSS_Full = (1 << 25),
1505 eSSP_Year = fSS_Year,
1506 eSSP_Month = fSS_Month,
1508 eSSP_Hour = fSS_Hour,
1509 eSSP_Minute = fSS_Minute,
1510 eSSP_Second = fSS_Second,
1511 eSSP_Millisecond = fSS_Millisecond,
1512 eSSP_Microsecond = fSS_Microsecond,
1513 eSSP_Nanosecond = fSS_Nanosecond,
1514 eSSP_Precision1 = fSS_Precision1,
1515 eSSP_Precision2 = fSS_Precision2,
1516 eSSP_Precision3 = fSS_Precision3,
1517 eSSP_Precision4 = fSS_Precision4,
1518 eSSP_Precision5 = fSS_Precision5,
1519 eSSP_Precision6 = fSS_Precision6,
1520 eSSP_Precision7 = fSS_Precision7,
1521 eSSP_Smart = fSS_Smart
1527 eSSZ_NoSkipZero = fSS_NoSkipZero,
1528 eSSZ_SkipZero = fSS_SkipZero
1535 string AsSmartString(ESmartStringPrecision
precision,
1537 ESmartStringZeroMode zero_mode = eSSZ_SkipZero)
const;
1552 string AsSmartString(TSmartStringFlags
flags = 0)
const;
1575 long GetCompleteDays(
void)
const;
1578 long GetCompleteHours(
void)
const;
1581 long GetCompleteMinutes(
void)
const;
1584 long GetCompleteSeconds(
void)
const;
1587 long GetNanoSecondsAfterSecond(
void)
const;
1595 double GetAsDouble(
void)
const;
1598 bool IsEmpty(
void)
const;
1605 void Set(
long seconds,
long nanoseconds = 0);
1608 void Set(
double seconds);
1657 int x_Hour(
void)
const;
1661 int x_Minute(
void)
const;
1665 int x_Second(
void)
const;
1671 void x_Normalize(
void);
1674 string x_AsSmartString_Smart_Big(TSmartStringFlags
flags)
const;
1675 string x_AsSmartString_Smart_Small(TSmartStringFlags
flags)
const;
1676 string x_AsSmartString_Precision(TSmartStringFlags
flags)
const;
1716 CTimeout(
unsigned int sec,
unsigned int usec);
1725 bool IsDefault()
const;
1726 bool IsInfinite()
const;
1727 bool IsZero()
const;
1729 bool IsFinite()
const;
1736 unsigned long GetAsMilliSeconds(
void)
const;
1739 double GetAsDouble(
void)
const;
1745 void Get(
unsigned int *sec,
unsigned int *microsec)
const;
1748 void GetNano(
unsigned int *sec,
unsigned int *nanosec)
const;
1756 void Set(EType
type);
1759 void Set(
unsigned int sec,
unsigned int microsec);
1762 void SetNano(
unsigned int sec,
unsigned int nanosec);
1765 void Set(
double sec);
1814 SetNano(seconds, nanoseconds);
1846 CDeadline(
unsigned int rel_seconds,
unsigned int rel_nanoseconds = 0);
1856 {
return !IsInfinite() && GetRemainingTime().IsZero(); }
1860 void GetExpirationTime(time_t* sec,
unsigned int* nanosec)
const;
1871 void x_SetNowPlus(
unsigned int seconds,
unsigned int nanoseconds);
1903 CTime GetLocalTime(
void);
1907 int GetLocalTimezone(
void);
1914 bool x_Tuneup(time_t timer,
long nanosec);
1961 double Elapsed(
void)
const;
1970 double Restart(
void);
1980 bool IsRunning(
void)
const;
2018 operator string(
void)
const;
2036 string AsSmartString(
2055 static double GetTimeMark();
2086 virtual const char* GetErrCodeString(
void)
const override;
2125 return tmp.AddYear(years);
2139 return tmp.AddDay(days);
2146 return tmp.AddHour(hours);
2153 return tmp.AddMinute(minutes);
2160 return tmp.AddSecond(seconds);
2167 return tmp.AddNanoSecond(nanoseconds);
2175 tmp.AddTimeSpan(ts);
2197 return tmp.Truncate();
2215 return os <<
t.AsString();
2250 return m_Str.empty();
2313 tmp.AddTimeSpan(ts);
2321 tmp.AddTimeSpan(-ts);
2332 CTime::operator
string(
void)
const {
return AsString(); }
2355 return !(*
this ==
t);
2361 return !(*
this <
t);
2367 return !(*
this >
t);
2373 return x_AddHour(hours, use_daylight,
true);
2395 return (
double)
DiffSecond(
t) / 60.0 / 60.0 / 24.0;
2505 Set(seconds, nanoseconds);
2593 CTimeSpan::operator
string(
void)
const {
return AsString(); }
2652 return !(*
this ==
t);
2677 return !(*
this <
t);
2683 return !(*
this >
t);
2743 return !(*
this ==
t);
2823 double mark = current -
m_Start;
bool operator!=(const _Ht_iterator< _Val, _Nonconst_traits< _Val >, _Key, _HF, _ExK, _EqK, _All > &__x, const _Ht_iterator< _Val, _Const_traits< _Val >, _Key, _HF, _ExK, _EqK, _All > &__y)
@ eEmpty
no filtering at all.
CNanoTimeout – Timeout interval, using nanoseconds.
CTimeout – Timeout interval.
Include a standard set of the NCBI C++ Toolkit most basic headers.
bool operator<(const CEquivRange &A, const CEquivRange &B)
bool operator==(const CEquivRange &A, const CEquivRange &B)
static const char * str(char *buf, int n)
#define NCBI_DEPRECATED_CTOR(decl)
Macro used to mark a constructor as deprecated.
ERound
Whether to truncate/round a value.
ESign
Signedness of a value.
@ eRound
Value must be rounded.
@ eNegative
Value is negative.
@ ePositive
Value is positive.
EErrCode
Error types that an application can generate.
CVect2< T > operator-(const CVect2< T > &v)
CExpression operator>=(CREATED, time_point)
CExpression operator<=(time_point, CREATED)
bool IsValid(const CSeq_point &pt, CScope *scope)
Checks that point >= 0 and point < length of Bioseq.
int32_t Int4
4-byte (32-bit) signed integer
uint16_t Uint2
2-byte (16-bit) unsigned integer
int64_t Int8
8-byte (64-bit) signed integer
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Int8 TSeconds
Number of seconds.
ETimeZone GetTimeZoneFormat(void) const
unsigned int TFlags
Binary OR of "EFlags".
bool x_Init(const string &str, const CTimeFormat &fmt, EErrAction err_action=eErr_Throw)
Helper method to set time value from string "str" using format "fmt".
double m_Total
Accumulated elapsed time.
int Minute(void) const
Get minute.
ESmartStringZeroMode
Which format use to output zero time span parts.
CTime & operator-=(const CTimeSpan &ts)
Operator to subtract time span.
int x_Second(void) const
Get second.
double DiffHour(const CTime &t) const
Difference in hours from specified time.
ETimeZonePrecision GetTimeZonePrecision(void) const
Get time zone precision.
CTime & ToLocalTime(void)
Convert the time into local time.
CTimeSpan operator+(const CTimeSpan &t) const
TSeconds TimeZoneOffset(void) const
Get difference between local timezone for current time object and UTC in seconds.
bool IsRunning(void) const
Check state of stopwatch.
EInitMode
Which initial value to use for time.
unsigned int TSmartStringFlags
Binary OR of "ESmartStringFlags".
double Restart(void)
Return time elapsed since first Start() or last Restart() call (in seconds).
CTimeSpan & operator=(const CTimeSpan &t)
Assignment operator.
EDayOfWeek
Day of week names.
Int4 days
days from 1/1/1900
ETimeZone SetTimeZone(ETimeZone val)
Set time zone.
CTime & operator=(const CTime &t)
Assignment operator.
CTime & AddTimeSpan(const CTimeSpan ×pan)
Add specified time span.
double Elapsed(void) const
Return time elapsed since first Start() or last Restart() call (in seconds).
bool IsEmpty(void) const
Return TRUE is an object keep zero time span.
bool IsGmtTime(void) const
bool operator==(const CTimeSpan &t) const
Operator to test equality of time span.
CTime operator-(const CTimeSpan &ts) const
Operator to subtract time span.
CTime operator+(const CTimeSpan &ts) const
EErrAction
Defines how to behave on error.
CTime & x_AddHour(int hours=1, EDaylight daylight=eDaylightDefault, bool shift_time=true)
Helper method to add hour with/without shift time.
TData m_Data
Packed members.
bool IsUniversalTime(void) const
Is time universal (GMT/UTC/Z)?
ETimeZone
Which initial value to use for timezone.
void SetFormat(const char *fmt, TFlags flags=fDefault)
Set the current time format.
CCurrentTime(ETimeZone tz=eLocal)
Constructor.
CTimeSpan & operator+=(const CTimeSpan &t)
#define NCBI_TIME_EMPTY_BITFIELD
long GetCompleteMinutes(void) const
Get number of complete minutes.
~CTimeout(void)
Destructor.
void x_Normalize(void)
Helper method to normalize stored time value.
long GetCompleteDays(void) const
Get number of complete days.
ETimeZone GetTimeZone(void) const
Get time zone.
int m_Timezone
Cached timezone adjustment for local time.
bool x_NeedAdjustTime(void) const
Helper method to check if there is a need adjust time in timezone.
long GetNanoSecondsAfterSecond(void) const
Get number of nanoseconds.
bool operator<=(const CTimeSpan &t) const
Operator to test if time span is less or equal.
void Set(long seconds, long nanoseconds=0)
Set time span in seconds and nanoseconds.
bool operator<(const CTimeSpan &t) const
Operator to test if time span is less.
EDaylight
Whether to adjust for daylight saving time.
ETimeZonePrecision SetTimeZonePrecision(ETimeZonePrecision val)
Set time zone precision.
CTime m_TunedTime
Last tuned time (changed by Tuneup())
CTime & AddMonth(int months=1, EDaylight adl=eDaylightDefault)
Add specified months and adjust for daylight saving time.
CTime & operator+=(const CTimeSpan &ts)
CTime Truncate(const CTime &t)
long NanoSecond(void) const
Get nano-seconds.
unsigned int m_SecAfterHour
Time interval in seconds after hour.
long MicroSecond(void) const
Get microseconds.
bool IsExpired(void) const
Check if the deadline is expired.
int Year(void) const
Get year.
void Stop(void)
Suspend the timer.
CCurrentTime & Update(void)
Update current time.
long MilliSecond(void) const
Get milliseconds.
CTime AddYear(const CTime &t, int years=1)
const long kMilliSecondsPerSecond
Number milliseconds in one second.
double GetAsDouble(void) const
Return time span as number of seconds.
CTime & ToTime(ETimeZone val)
Convert the time into specified time zone time.
CTime AddDay(const CTime &t, int days=1)
time_t m_LastSysTime
Last system time.
bool IsEmpty(void) const
Is time object empty (date and time)?
TFlags m_Flags
Format flags.
CStopWatch(EStart state=eStop)
Constructor.
CTime & ToUniversalTime(void)
Convert the time into universal (GMT/UTC) time.
CTime & AddYear(int years=1, EDaylight adl=eDaylightDefault)
Add specified years and adjust for daylight saving time.
ESign GetSign(void) const
Get sign of time span.
bool operator<=(const CTime &t) const
Operator to test if time is earlier or equal.
ETimeZone SetTimeZoneFormat(ETimeZone val)
void Invert(void)
Invert time span. Changes time span sign.
CTime & SetCurrent(void)
Make the time current in the presently active time zone.
CTimeSpan & operator-=(const CTimeSpan &t)
Operator to subtract time span.
CTime CurrentTime(CTime::ETimeZone tz=CTime::eLocal, CTime::ETimeZonePrecision tzp=CTime::eTZPrecisionDefault)
unsigned int m_Nanoseconds
EPredefined
Predefined formats.
struct TDBTimeU * TDBTimeUPtr
ETimeZonePrecision
What time zone precision to use for adjusting daylight saving time.
string AsSmartString(CTimeSpan::ESmartStringPrecision precision, ERound rounding, CTimeSpan::ESmartStringZeroMode zero_mode=CTimeSpan::eSSZ_SkipZero) const
Transform elapsed time to "smart" string.
CTimeout(void)
Create default timeout.
string AsSmartString(ESmartStringPrecision precision, ERound rounding, ESmartStringZeroMode zero_mode=eSSZ_SkipZero) const
Transform time span to "smart" string.
EStart
Defines how to create new timer.
struct TDBTimeI * TDBTimeIPtr
const TSeconds kAverageSecondsPerMonth
CTimeSpan DiffTimeSpan(const CTime &t) const
Difference in nanoseconds from specified time.
ostream & operator<<(ostream &os, const CStopWatch &sw)
Dumps the current stopwatch time to an output stream.
bool operator>(const CTimeSpan &t) const
Operator to test if time span is greater.
unsigned int m_Sec
Seconds part of the timeout.
CTimeSpan(void)
Default constructor.
ETimeZonePrecision tzprec
int Day(void) const
Get day.
static double GetTimeMark()
Get current time mark.
TSeconds DiffSecond(const CTime &t) const
Difference in seconds from specified time.
const double kAverageDaysPerYear
The average length of the year in the Gregorian (modern) calendar (in days)
ESmartStringPrecision
Precision for span "smart" string.
unsigned int m_NanoSec
Nanoseconds part of the timeout.
int x_Hour(void) const
Get hour.
Uint2 days
Days from 1/1/1900.
CTime AddHour(const CTime &t, int hours=1)
const string & GetString(void) const
Get format string.
CTimeSpan operator-(void) const
Unary operator "-" (minus) to change time span sign.
void Start(void)
Start the timer.
static CTimeFormat GetFormat(void)
Get the current time format.
bool operator>=(const CTime &t) const
Operator to test if time is later or equal.
bool IsEmpty(void) const
Check that format string is empty.
long m_NanoSec
Nanoseconds after the second.
NCBI_EXCEPTION_DEFAULT(CTimeException, CCoreException)
Uint2 time
Minutes from the beginning of current day.
Int4 time
x/300 seconds from the beginning of current day
TSeconds TimeZoneDiff(void) const
Get difference between local timezone for current time object and UTC in seconds.
ESmartStringFlags
AsSmartString() conversion flags.
CTime operator+(const CTimeSpan &ts, const CTime &t)
CTime m_LocalTime
Current local time.
string AsString(const CTimeFormat &fmt=kEmptyStr) const
Transform stopwatch time to string.
void Set(EType type)
Set special value.
int m_Daylight
Cached system daylight information.
CTime GetFastLocalTime(void)
Quick and dirty getter of local time.
double DiffNanoSecond(const CTime &t) const
Difference in nanoseconds from specified time.
int x_Minute(void) const
Get minute.
ERoundPrecision
Precision for rounding time.
double DiffDay(const CTime &t) const
Difference in days from specified time.
CTime AddMinute(const CTime &t, int minutes=1)
CTime & SetTimeT(const time_t t)
Set time using time_t time value.
double DiffMinute(const CTime &t) const
Difference in minutes from specified time.
CNanoTimeout(unsigned int seconds, unsigned int nanoseconds)
bool operator!=(const CTimeout &t) const
Operator to test in-equality of timeouts.
int Hour(void) const
Get hour.
bool IsInfinite(void) const
Check if the deadline is infinite.
CTime & x_SetTimeMTSafe(const time_t *t=0)
Version of x_SetTime() with MT-safe locks.
bool IsFinite() const
Check if timeout holds a numeric value.
void TuneupFastLocalTime(void)
CTime GetGmtTime(void) const
double m_Start
Start time value.
CTimeSpan & Clear(void)
Make the time span "empty",.
void Reset(void)
Stop (if running) and reset the timer.
string m_Str
String format.
CDeadline(CTimeout::EType)
bool operator>=(const CTimeSpan &t) const
Operator to test if time span is greater or equal.
CTime AddNanoSecond(const CTime &t, long nanoseconds=1)
EType
Type of special deadlines.
bool IsLocalTime(void) const
Is time local time?
const long kMicroSecondsPerSecond
Number of microseconds in one second.
TFlags GetFlags(void) const
Get format flags.
long GetCompleteSeconds(void) const
Get number of complete seconds.
EStart m_State
Stopwatch state (started/stopped)
CTime & AddHour(int hours=1, EDaylight adl=eDaylightDefault)
Add specified hours and adjust for daylight saving time.
CTime AddMonth(const CTime &t, int months=1)
const TSeconds kAverageSecondsPerYear
The average length of the year in the Gregorian (modern) calendar (in seconds)
int Second(void) const
Get second.
int Month(void) const
Get month.
long GetCompleteHours(void) const
Get number of complete hours.
bool operator!=(const CTime &t) const
Operator to test in-equality of time.
void *volatile m_IsTuneup
(bool) Tuneup() in progress (MT)
const long kNanoSecondsPerSecond
Number of nanoseconds in one second.
EType m_Type
Type of timeout.
CTime AddSecond(const CTime &t, long seconds=1)
bool operator!=(const CTimeSpan &t) const
Operator to test in-equality of time span.
ENameFormat
Which format use to get name of month or week of day.
time_t m_LastTuneupTime
Last Tuneup() time.
long m_Sec
Seconds part of the time span.
#define NCBI_TIME_BITFIELD(n)
bool IsEmptyDate(void) const
Is date empty?
@ eSSZ_SkipZero
Skip zero valued parts.
@ eSSZ_NoSkipZero
Print zero valued parts.
@ eCurrent
Use current time. See also CCurrentTime.
@ eErr_Throw
Throw an exception on error.
@ eUTC
UTC (Universal Coordinated Time)
@ eGmt
GMT (Greenwich Mean Time)
@ eConvert
Error converting value from one format to another.
@ eInvalid
Invalid time value.
@ eArgument
Bad function argument.
@ eAdjustDaylight
Adjust for daylight saving time.
@ eIgnoreDaylight
Ignore daylight saving time.
@ eDefault
Default timeout (to be interpreted by the client code)
@ eInfinite
Infinite timeout.
@ eFinite
A finite timeout value has been set.
@ eNone
Daylight saving not to affect time manipulations.
@ eMinute
Check condition - new minute.
@ eMonth
Check condition - new month.
@ eDay
Check condition - new day.
@ eHour
Check condition - new hour.
@ eStart
Start timer immediately after creating.
@ eStop
Do not start timer, just create it.
@ eRound_Minute
Round to minutes.
@ eRound_Day
Round to days.
@ eRound_Hour
Round to hours.
@ eRound_Millisecond
Round to milliseconds.
@ eRound_Second
Round to seconds.
#define NCBI_XNCBI_EXPORT
unsigned int
A callback function used to compare two keys in a database.
CNcbiMatrix< T > & operator+=(CNcbiMatrix< T > &, const CNcbiMatrix< U > &)
global addition: matrix += matrix
CNcbiMatrix< T > & operator-=(CNcbiMatrix< T > &, const CNcbiMatrix< U > &)
global subtraction: matrix -= matrix
const TYPE & Get(const CNamedParameterList *param)
ESerialDataFormat GetFormat(const string &name)
Database format for time where day and time is signed 32 bit.
Database format for time where day and time is unsigned 16 bit.
static int Round(double Num)
bool operator>(const typename tree< T, tree_node_allocator >::iterator_base &one, const typename tree< T, tree_node_allocator >::iterator_base &two)