NCBI C++ ToolKit
|
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 | CCurrentTime |
CCurrentTime –. More... | |
class | CTimeSpan |
CTimeSpan. More... | |
class | CTimeout |
CTimeout – Timeout interval. More... | |
class | CNanoTimeout |
CNanoTimeout – Timeout interval, using nanoseconds. More... | |
class | CDeadline |
CDeadline. More... | |
class | CFastLocalTime |
CFastLocalTime –. More... | |
class | CStopWatch |
CStopWatch –. More... | |
class | CTimeException |
CTimeException –. More... | |
Macros | |
#define | NCBI_TIME_BITFIELD(n) : n |
#define | NCBI_TIME_EMPTY_BITFIELD unsigned : 0; |
Typedefs | |
typedef Int8 | TSeconds |
Number of seconds. More... | |
typedef struct TDBTimeU * | TDBTimeUPtr |
typedef struct TDBTimeI * | TDBTimeIPtr |
typedef unsigned int | CTimeFormat::TFlags |
Binary OR of "EFlags". More... | |
typedef unsigned int | CTimeSpan::TSmartStringFlags |
Binary OR of "ESmartStringFlags". More... | |
typedef CDeadline | CAbsTimeout |
Functions | |
CTimeFormat::CTimeFormat (void) | |
Default constructor. More... | |
CTimeFormat::CTimeFormat (const CTimeFormat &fmt) | |
Copy constructor. More... | |
CTimeFormat::CTimeFormat (const char *fmt, TFlags flags=fDefault) | |
Constructor. More... | |
CTimeFormat::CTimeFormat (const string &fmt, TFlags flags=fDefault) | |
Constructor. More... | |
CTimeFormat & | CTimeFormat::operator= (const CTimeFormat &fmt) |
Assignment operator. More... | |
void | CTimeFormat::SetFormat (const char *fmt, TFlags flags=fDefault) |
Set the current time format. More... | |
void | CTimeFormat::SetFormat (const string &fmt, TFlags flags=fDefault) |
Set the current time format. More... | |
const string & | CTimeFormat::GetString (void) const |
Get format string. More... | |
TFlags | CTimeFormat::GetFlags (void) const |
Get format flags. More... | |
bool | CTimeFormat::IsEmpty (void) const |
Check that format string is empty. More... | |
static CTimeFormat | CTimeFormat::GetPredefined (EPredefined fmt, TFlags flags=fDefault) |
Get predefined format. More... | |
CTimeFormat::operator string (void) const | |
Return time format as string. More... | |
CTime::CTime (EInitMode mode=eEmpty, ETimeZone tz=eLocal, ETimeZonePrecision tzp=eTZPrecisionDefault) | |
Constructor. More... | |
CTime::CTime (time_t t, ETimeZonePrecision tzp=eTZPrecisionDefault) | |
Conversion constructor for time_t representation of time. More... | |
CTime::CTime (const struct tm &t, ETimeZonePrecision tzp=eTZPrecisionDefault) | |
Conversion constructor for "struct tm" local time representation. More... | |
CTime::CTime (int year, int month, int day, int hour=0, int minute=0, int second=0, long nanosecond=0, ETimeZone tz=eLocal, ETimeZonePrecision tzp=eTZPrecisionDefault) | |
Constructor. More... | |
CTime::CTime (int year, int yearDayNumber, ETimeZone tz=eLocal, ETimeZonePrecision tzp=eTZPrecisionDefault) | |
Constructor. More... | |
CTime::CTime (const string &str, const CTimeFormat &fmt=kEmptyStr, ETimeZone tz=eLocal, ETimeZonePrecision tzp=eTZPrecisionDefault) | |
Explicit conversion constructor for string representation of time. More... | |
CTime::CTime (const CTime &t) | |
Copy constructor. More... | |
CTime & | CTime::operator= (const CTime &t) |
Assignment operator. More... | |
CTime & | CTime::operator= (const string &str) |
Assignment operator from string. More... | |
CTime & | CTime::SetTimeT (const time_t t) |
Set time using time_t time value. More... | |
time_t | CTime::GetTimeT (void) const |
Get time in time_t format. More... | |
static void | CTime::GetCurrentTimeT (time_t *sec, long *nanosec=0) |
Get current UTC time in time_t format (with nanoseconds). More... | |
CTime & | CTime::SetTimeTM (const struct tm &t) |
Set time using "struct tm" time value. More... | |
struct tm | CTime::GetTimeTM (void) const |
Get time in "struct tm" format. More... | |
CTime & | CTime::SetTimeDBU (const TDBTimeU &t) |
Set time using database format time, TDBTimeU. More... | |
CTime & | CTime::SetTimeDBI (const TDBTimeI &t) |
Set time using database format time, TDBTimeI. More... | |
TDBTimeU | CTime::GetTimeDBU (void) const |
Get time in database format time, TDBTimeU. More... | |
TDBTimeI | CTime::GetTimeDBI (void) const |
Get time in database format time, TDBTimeI. More... | |
CTime & | CTime::SetCurrent (void) |
Make the time current in the presently active time zone. More... | |
CTime & | CTime::Clear (void) |
Make the time "empty",. More... | |
static void | CTime::SetFormat (const CTimeFormat &fmt) |
Set the current time format. More... | |
static CTimeFormat | CTime::GetFormat (void) |
Get the current time format. More... | |
static int | CTime::MonthNameToNum (const string &month) |
Get numerical value of the month by name. More... | |
static string | CTime::MonthNumToName (int month, ENameFormat format=eFull) |
Get name of the month by numerical value. More... | |
static int | CTime::DayOfWeekNameToNum (const string &day) |
Get numerical value of the day of week by name. More... | |
static string | CTime::DayOfWeekNumToName (int day, ENameFormat format=eFull) |
Get name of the day of week by numerical value. More... | |
string | CTime::AsString (const CTimeFormat &format=kEmptyStr, TSeconds out_tz=eCurrentTimeZone) const |
Transform time to string. More... | |
CTime::operator string (void) const | |
Return time as string using the format returned by GetFormat(). More... | |
int | CTime::Year (void) const |
Get year. More... | |
int | CTime::Month (void) const |
Get month. More... | |
int | CTime::Day (void) const |
Get day. More... | |
int | CTime::Hour (void) const |
Get hour. More... | |
int | CTime::Minute (void) const |
Get minute. More... | |
int | CTime::Second (void) const |
Get second. More... | |
long | CTime::MilliSecond (void) const |
Get milliseconds. More... | |
long | CTime::MicroSecond (void) const |
Get microseconds. More... | |
long | CTime::NanoSecond (void) const |
Get nano-seconds. More... | |
void | CTime::SetYear (int year) |
Set year. More... | |
void | CTime::SetMonth (int month) |
Set month. More... | |
void | CTime::SetDay (int day) |
Set day. More... | |
void | CTime::SetHour (int hour) |
Set hour. More... | |
void | CTime::SetMinute (int minute) |
Set minute. More... | |
void | CTime::SetSecond (int second) |
Set second. More... | |
void | CTime::SetMilliSecond (long millisecond) |
Set milliseconds. More... | |
void | CTime::SetMicroSecond (long microsecond) |
Set microseconds. More... | |
void | CTime::SetNanoSecond (long nanosecond) |
Set nanoseconds. More... | |
int | CTime::YearDayNumber (void) const |
Get year's day number. More... | |
int | CTime::YearWeekNumber (EDayOfWeek first_day_of_week=eSunday) const |
Get this date's week number within the year. More... | |
int | CTime::MonthWeekNumber (EDayOfWeek first_day_of_week=eSunday) const |
Get this date's week number in the month. More... | |
int | CTime::DayOfWeek (void) const |
Get day of week. More... | |
int | CTime::DaysInMonth (void) const |
Get number of days in the month. More... | |
CTime & | CTime::AddYear (int years=1, EDaylight adl=eDaylightDefault) |
Add specified years and adjust for daylight saving time. More... | |
CTime & | CTime::AddMonth (int months=1, EDaylight adl=eDaylightDefault) |
Add specified months and adjust for daylight saving time. More... | |
CTime & | CTime::AddDay (int days=1, EDaylight adl=eDaylightDefault) |
Add specified days and adjust for daylight saving time. More... | |
CTime & | CTime::AddHour (int hours=1, EDaylight adl=eDaylightDefault) |
Add specified hours and adjust for daylight saving time. More... | |
CTime & | CTime::AddMinute (int minutes=1, EDaylight adl=eDaylightDefault) |
Add specified minutes and adjust for daylight saving time. More... | |
CTime & | CTime::AddSecond (TSeconds seconds=1, EDaylight adl=eDaylightDefault) |
Add specified seconds. More... | |
CTime & | CTime::AddNanoSecond (long nanoseconds=1) |
Add specified nanoseconds. More... | |
CTime & | CTime::AddTimeSpan (const CTimeSpan ×pan) |
Add specified time span. More... | |
CTime & | CTime::Round (ERoundPrecision precision=eRound_Day, EDaylight adl=eDaylightDefault) |
Round time. More... | |
CTime & | CTime::Truncate (ERoundPrecision precision=eRound_Day) |
Truncate time. More... | |
CTime & | CTime::operator+= (const CTimeSpan &ts) |
CTime & | CTime::operator-= (const CTimeSpan &ts) |
Operator to subtract time span. More... | |
CTime | CTime::operator+ (const CTimeSpan &ts) const |
CTime | CTime::operator- (const CTimeSpan &ts) const |
Operator to subtract time span. More... | |
CTimeSpan | CTime::operator- (const CTime &t) const |
Operator to subtract times. More... | |
bool | CTime::operator== (const CTime &t) const |
Operator to test equality of time. More... | |
bool | CTime::operator!= (const CTime &t) const |
Operator to test in-equality of time. More... | |
bool | CTime::operator> (const CTime &t) const |
Operator to test if time is later. More... | |
bool | CTime::operator< (const CTime &t) const |
Operator to test if time is earlier. More... | |
bool | CTime::operator>= (const CTime &t) const |
Operator to test if time is later or equal. More... | |
bool | CTime::operator<= (const CTime &t) const |
Operator to test if time is earlier or equal. More... | |
int | CTime::DiffWholeDays (const CTime &t) const |
Difference in whole days from specified time. More... | |
double | CTime::DiffDay (const CTime &t) const |
Difference in days from specified time. More... | |
double | CTime::DiffHour (const CTime &t) const |
Difference in hours from specified time. More... | |
double | CTime::DiffMinute (const CTime &t) const |
Difference in minutes from specified time. More... | |
TSeconds | CTime::DiffSecond (const CTime &t) const |
Difference in seconds from specified time. More... | |
double | CTime::DiffNanoSecond (const CTime &t) const |
Difference in nanoseconds from specified time. More... | |
CTimeSpan | CTime::DiffTimeSpan (const CTime &t) const |
Difference in nanoseconds from specified time. More... | |
bool | CTime::IsEmpty (void) const |
Is time object empty (date and time)? More... | |
bool | CTime::IsEmptyDate (void) const |
Is date empty? More... | |
bool | CTime::IsLeap (void) const |
Is time in a leap year? More... | |
bool | CTime::IsValid (void) const |
Is time valid? More... | |
bool | CTime::IsLocalTime (void) const |
Is time local time? More... | |
bool | CTime::IsUniversalTime (void) const |
Is time universal (GMT/UTC/Z)? More... | |
bool | CTime::IsGmtTime (void) const |
bool | CTime::IsDST (void) const |
Is DST (daylight savings time) in effect for this time? More... | |
static bool | CTime::ValidateString (const string &str, const CTimeFormat &fmt=kEmptyStr) |
Validate if string match time format. More... | |
ETimeZone | CTime::GetTimeZone (void) const |
Get time zone. More... | |
ETimeZone | CTime::GetTimeZoneFormat (void) const |
ETimeZone | CTime::SetTimeZone (ETimeZone val) |
Set time zone. More... | |
ETimeZone | CTime::SetTimeZoneFormat (ETimeZone val) |
ETimeZonePrecision | CTime::GetTimeZonePrecision (void) const |
Get time zone precision. More... | |
ETimeZonePrecision | CTime::SetTimeZonePrecision (ETimeZonePrecision val) |
Set time zone precision. More... | |
CTime | CTime::GetLocalTime (void) const |
Get the time as local time. More... | |
CTime | CTime::GetUniversalTime (void) const |
Get the time as universal (GMT/UTC) time. More... | |
CTime | CTime::GetGmtTime (void) const |
CTime & | CTime::ToTime (ETimeZone val) |
Convert the time into specified time zone time. More... | |
CTime & | CTime::ToLocalTime (void) |
Convert the time into local time. More... | |
CTime & | CTime::ToUniversalTime (void) |
Convert the time into universal (GMT/UTC) time. More... | |
CTime & | CTime::ToGmtTime (void) |
TSeconds | CTime::TimeZoneDiff (void) const |
Get difference between local timezone for current time object and UTC in seconds. More... | |
TSeconds | CTime::TimeZoneOffset (void) const |
Get difference between local timezone for current time object and UTC in seconds. More... | |
string | CTime::TimeZoneOffsetStr (void) |
Get time zone offset string in format [+/-]HHMM. More... | |
string | CTime::TimeZoneName (void) |
Get current time zone name. More... | |
bool | CTime::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". More... | |
CTime & | CTime::x_SetTime (const time_t *t=0) |
Helper method to set time from 'time_t' – If "t" not specified, then set to current time. More... | |
CTime & | CTime::x_SetTimeMTSafe (const time_t *t=0) |
Version of x_SetTime() with MT-safe locks. More... | |
void | CTime::x_AdjustDay (void) |
Helper method to adjust day number to correct value after day manipulations. More... | |
CTime & | CTime::x_AdjustTime (const CTime &from, bool shift_time=true) |
Helper method to adjust the time to correct timezone (across the barrier of winter & summer times) using "from" as a reference point. More... | |
CTime & | CTime::x_AdjustTimeImmediately (const CTime &from, bool shift_time=true) |
Helper method to forcibly adjust timezone using "from" as a reference point. More... | |
bool | CTime::x_NeedAdjustTime (void) const |
Helper method to check if there is a need adjust time in timezone. More... | |
CTime & | CTime::x_AddHour (int hours=1, EDaylight daylight=eDaylightDefault, bool shift_time=true) |
Helper method to add hour with/without shift time. More... | |
CCurrentTime::CCurrentTime (ETimeZone tz=eLocal) | |
Constructor. More... | |
CCurrentTime & | CCurrentTime::Update (void) |
Update current time. More... | |
CTimeSpan::CTimeSpan (void) | |
Default constructor. More... | |
CTimeSpan::CTimeSpan (long days, long hours, long minutes, long seconds, long nanoseconds=0) | |
Constructor. More... | |
CTimeSpan::CTimeSpan (long seconds, long nanoseconds=0) | |
Constructor. More... | |
CTimeSpan::CTimeSpan (double seconds) | |
Constructor. More... | |
CTimeSpan::CTimeSpan (const string &str, const CTimeFormat &fmt=kEmptyStr) | |
Explicit conversion constructor for string representation of time span. More... | |
CTimeSpan::CTimeSpan (const CTimeSpan &t) | |
Copy constructor. More... | |
CTimeSpan & | CTimeSpan::operator= (const CTimeSpan &t) |
Assignment operator. More... | |
CTimeSpan & | CTimeSpan::operator= (const string &str) |
Assignment operator. More... | |
CTimeSpan & | CTimeSpan::Clear (void) |
Make the time span "empty",. More... | |
ESign | CTimeSpan::GetSign (void) const |
Get sign of time span. More... | |
static void | CTimeSpan::SetFormat (const CTimeFormat &format) |
Set the current time span format. More... | |
static CTimeFormat | CTimeSpan::GetFormat (void) |
Get the current time span format. More... | |
string | CTimeSpan::AsString (const CTimeFormat &fmt=kEmptyStr) const |
Transform time span to string. More... | |
CTimeSpan::operator string (void) const | |
Return span time as string using the format returned by GetFormat(). More... | |
string | CTimeSpan::AsSmartString (ESmartStringPrecision precision, ERound rounding, ESmartStringZeroMode zero_mode=eSSZ_SkipZero) const |
Transform time span to "smart" string. More... | |
string | CTimeSpan::AsSmartString (TSmartStringFlags flags=0) const |
Transform time span to "smart" string. More... | |
CTimeSpan & | CTimeSpan::AssignFromSmartString (const string &str) |
Assign value to time span object from string representation of time in formats produced by AsSmartString(). More... | |
long | CTimeSpan::GetCompleteDays (void) const |
Get number of complete days. More... | |
long | CTimeSpan::GetCompleteHours (void) const |
Get number of complete hours. More... | |
long | CTimeSpan::GetCompleteMinutes (void) const |
Get number of complete minutes. More... | |
long | CTimeSpan::GetCompleteSeconds (void) const |
Get number of complete seconds. More... | |
long | CTimeSpan::GetNanoSecondsAfterSecond (void) const |
Get number of nanoseconds. More... | |
double | CTimeSpan::GetAsDouble (void) const |
Return time span as number of seconds. More... | |
bool | CTimeSpan::IsEmpty (void) const |
Return TRUE is an object keep zero time span. More... | |
void | CTimeSpan::Set (long seconds, long nanoseconds=0) |
Set time span in seconds and nanoseconds. More... | |
void | CTimeSpan::Set (double seconds) |
Set time span from number of seconds (fractional value). More... | |
CTimeSpan & | CTimeSpan::operator+= (const CTimeSpan &t) |
CTimeSpan | CTimeSpan::operator+ (const CTimeSpan &t) const |
CTimeSpan & | CTimeSpan::operator-= (const CTimeSpan &t) |
Operator to subtract time span. More... | |
CTimeSpan | CTimeSpan::operator- (const CTimeSpan &t) const |
Operator to subtract time span. More... | |
CTimeSpan | CTimeSpan::operator- (void) const |
Unary operator "-" (minus) to change time span sign. More... | |
void | CTimeSpan::Invert (void) |
Invert time span. Changes time span sign. More... | |
bool | CTimeSpan::operator== (const CTimeSpan &t) const |
Operator to test equality of time span. More... | |
bool | CTimeSpan::operator!= (const CTimeSpan &t) const |
Operator to test in-equality of time span. More... | |
bool | CTimeSpan::operator> (const CTimeSpan &t) const |
Operator to test if time span is greater. More... | |
bool | CTimeSpan::operator< (const CTimeSpan &t) const |
Operator to test if time span is less. More... | |
bool | CTimeSpan::operator>= (const CTimeSpan &t) const |
Operator to test if time span is greater or equal. More... | |
bool | CTimeSpan::operator<= (const CTimeSpan &t) const |
Operator to test if time span is less or equal. More... | |
int | CTimeSpan::x_Hour (void) const |
Get hour. More... | |
int | CTimeSpan::x_Minute (void) const |
Get minute. More... | |
int | CTimeSpan::x_Second (void) const |
Get second. More... | |
void | CTimeSpan::x_Init (const string &str, const CTimeFormat &fmt) |
Helper method to set time value from string "str" using format "fmt". More... | |
void | CTimeSpan::x_Normalize (void) |
Helper method to normalize stored time value. More... | |
string | CTimeSpan::x_AsSmartString_Smart_Big (TSmartStringFlags flags) const |
Helpers for AsSmartString() More... | |
string | CTimeSpan::x_AsSmartString_Smart_Small (TSmartStringFlags flags) const |
string | CTimeSpan::x_AsSmartString_Precision (TSmartStringFlags flags) const |
CTimeout::CTimeout (void) | |
Create default timeout. More... | |
CTimeout::CTimeout (EType type) | |
Create timeout of specified type. More... | |
CTimeout::CTimeout (const CTimeSpan &ts) | |
Initialize timeout from CTimeSpan. More... | |
CTimeout::CTimeout (unsigned int sec, unsigned int usec) | |
Initialize timeout in seconds and microseconds. More... | |
CTimeout::CTimeout (double sec) | |
Initialize timeout from number of seconds (fractional value). More... | |
CTimeout::~CTimeout (void) | |
Destructor. More... | |
bool | CTimeout::IsDefault () const |
bool | CTimeout::IsInfinite () const |
bool | CTimeout::IsZero () const |
bool | CTimeout::IsFinite () const |
Check if timeout holds a numeric value. More... | |
unsigned long | CTimeout::GetAsMilliSeconds (void) const |
Get as number of milliseconds. More... | |
double | CTimeout::GetAsDouble (void) const |
Get as number of seconds (fractional value). More... | |
CTimeSpan | CTimeout::GetAsTimeSpan (void) const |
Convert to CTimeSpan. More... | |
void | CTimeout::Get (unsigned int *sec, unsigned int *microsec) const |
Get timeout in seconds and microseconds. More... | |
void | CTimeout::GetNano (unsigned int *sec, unsigned int *nanosec) const |
Get timeout in seconds and nanoseconds. More... | |
void | CTimeout::Set (EType type) |
Set special value. More... | |
void | CTimeout::Set (unsigned int sec, unsigned int microsec) |
Set timeout in seconds and microseconds. More... | |
void | CTimeout::SetNano (unsigned int sec, unsigned int nanosec) |
Set timeout in seconds and nanoseconds. More... | |
void | CTimeout::Set (double sec) |
Set timeout from number of seconds (fractional value). More... | |
void | CTimeout::Set (const CTimeSpan &ts) |
Set from CTimeSpan. More... | |
bool | CTimeout::operator== (const CTimeout &t) const |
Operator to test equality of timeouts. More... | |
bool | CTimeout::operator!= (const CTimeout &t) const |
Operator to test in-equality of timeouts. More... | |
bool | CTimeout::operator> (const CTimeout &t) const |
Operator to test if timeout is greater. More... | |
bool | CTimeout::operator< (const CTimeout &t) const |
Operator to test if timeout is less. More... | |
bool | CTimeout::operator>= (const CTimeout &t) const |
Operator to test if timeout is greater or equal. More... | |
bool | CTimeout::operator<= (const CTimeout &t) const |
Operator to test if timeout is less or equal. More... | |
CNanoTimeout::CNanoTimeout (unsigned int seconds, unsigned int nanoseconds) | |
CDeadline::CDeadline (EType type=eNoWait) | |
Initialize deadline of specified type. More... | |
CDeadline::CDeadline (unsigned int rel_seconds, unsigned int rel_nanoseconds=0) | |
Initialize deadline using seconds and nanoseconds (adding to the current time) More... | |
CDeadline::CDeadline (const CTimeout &timeout) | |
Initialize deadline by adding relative timeout to the current time. More... | |
bool | CDeadline::IsInfinite (void) const |
Check if the deadline is infinite. More... | |
bool | CDeadline::IsExpired (void) const |
Check if the deadline is expired. More... | |
void | CDeadline::GetExpirationTime (time_t *sec, unsigned int *nanosec) const |
Get the number of seconds and nanoseconds (since 1/1/1970). More... | |
CNanoTimeout | CDeadline::GetRemainingTime (void) const |
Get time left to the expiration. More... | |
bool | CDeadline::operator< (const CDeadline &right_hand_operand) const |
Compare two CDeadline values. More... | |
CDeadline::CDeadline (CTimeout::EType) | |
void | CDeadline::x_SetNowPlus (unsigned int seconds, unsigned int nanoseconds) |
CFastLocalTime::CFastLocalTime (unsigned int sec_after_hour=5) | |
Constructor. More... | |
CTime | CFastLocalTime::GetLocalTime (void) |
Get local time. More... | |
int | CFastLocalTime::GetLocalTimezone (void) |
Get difference in seconds between UTC and current local time (daylight information included) More... | |
void | CFastLocalTime::Tuneup (void) |
Do unscheduled check. More... | |
bool | CFastLocalTime::x_Tuneup (time_t timer, long nanosec) |
Internal version of Tuneup() More... | |
CStopWatch::CStopWatch (EStart state=eStop) | |
Constructor. More... | |
CStopWatch::CStopWatch (bool start) | |
Constructor. More... | |
void | CStopWatch::Start (void) |
Start the timer. More... | |
double | CStopWatch::Elapsed (void) const |
Return time elapsed since first Start() or last Restart() call (in seconds). More... | |
void | CStopWatch::Stop (void) |
Suspend the timer. More... | |
double | CStopWatch::Restart (void) |
Return time elapsed since first Start() or last Restart() call (in seconds). More... | |
void | CStopWatch::Reset (void) |
Stop (if running) and reset the timer. More... | |
bool | CStopWatch::IsRunning (void) const |
Check state of stopwatch. More... | |
static void | CStopWatch::SetFormat (const CTimeFormat &fmt) |
Set the current stopwatch time format. More... | |
static CTimeFormat | CStopWatch::GetFormat (void) |
Get the current stopwatch time format. More... | |
string | CStopWatch::AsString (const CTimeFormat &fmt=kEmptyStr) const |
Transform stopwatch time to string. More... | |
CStopWatch::operator string (void) const | |
Return stopwatch time as string using the format returned by GetFormat(). More... | |
string | CStopWatch::AsSmartString (CTimeSpan::ESmartStringPrecision precision, ERound rounding, CTimeSpan::ESmartStringZeroMode zero_mode=CTimeSpan::eSSZ_SkipZero) const |
Transform elapsed time to "smart" string. More... | |
string | CStopWatch::AsSmartString (CTimeSpan::TSmartStringFlags flags=0) const |
Transform elapsed time to "smart" string. More... | |
static double | CStopWatch::GetTimeMark () |
Get current time mark. More... | |
virtual const char * | CTimeException::GetErrCodeString (void) const override |
Translate from the error code value to its string representation. More... | |
CTimeException::NCBI_EXCEPTION_DEFAULT (CTimeException, CCoreException) | |
CTime | GetFastLocalTime (void) |
Quick and dirty getter of local time. More... | |
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. More... | |
ostream & | operator<< (ostream &os, const CTime &t) |
Dumps the current CTime time to an output stream. More... | |
Variables | |
const long | kNanoSecondsPerSecond = 1000000000 |
Number of nanoseconds in one second. More... | |
const long | kMicroSecondsPerSecond = 1000000 |
Number of microseconds in one second. More... | |
const long | kMilliSecondsPerSecond = 1000 |
Number milliseconds in one second. More... | |
const double | kAverageDaysPerYear = 365.2425 |
The average length of the year in the Gregorian (modern) calendar (in days) More... | |
const TSeconds | kAverageSecondsPerYear = 31556952 |
The average length of the year in the Gregorian (modern) calendar (in seconds) More... | |
const TSeconds | kAverageSecondsPerMonth = kAverageSecondsPerYear/12 |
Uint2 | TDBTimeU::days |
Days from 1/1/1900. More... | |
Uint2 | TDBTimeU::time |
Minutes from the beginning of current day. More... | |
Int4 | TDBTimeI::days |
days from 1/1/1900 More... | |
Int4 | TDBTimeI::time |
x/300 seconds from the beginning of current day More... | |
string | CTimeFormat::m_Str |
String format. More... | |
TFlags | CTimeFormat::m_Flags |
Format flags. More... | |
unsigned int | CTime::TData::year: 12 |
unsigned char | CTime::TData::month: 4 |
unsigned char | CTime::TData::day: 5 |
unsigned char | CTime::TData::hour: 5 |
unsigned char | CTime::TData::min: 6 |
unsigned char | CTime::TData::sec: 6 |
Int4 | CTime::TData::adjTimeDiff: 18 |
ETimeZone | CTime::TData::tz: 3 |
ETimeZonePrecision | CTime::TData::tzprec: 4 |
unsigned | CTime::TData::__pad0__: 0 |
Int4 | CTime::TData::nanosec |
TData | CTime::m_Data |
Packed members. More... | |
long | CTimeSpan::m_Sec |
Seconds part of the time span. More... | |
long | CTimeSpan::m_NanoSec |
Nanoseconds after the second. More... | |
EType | CTimeout::m_Type |
Type of timeout. More... | |
unsigned int | CTimeout::m_Sec |
Seconds part of the timeout. More... | |
unsigned int | CTimeout::m_NanoSec |
Nanoseconds part of the timeout. More... | |
time_t | CDeadline::m_Seconds |
unsigned int | CDeadline::m_Nanoseconds |
bool | CDeadline::m_Infinite |
unsigned int | CFastLocalTime::m_SecAfterHour |
Time interval in seconds after hour. More... | |
CTime | CFastLocalTime::m_LocalTime |
Current local time. More... | |
CTime | CFastLocalTime::m_TunedTime |
Last tuned time (changed by Tuneup()) More... | |
time_t | CFastLocalTime::m_LastTuneupTime |
Last Tuneup() time. More... | |
time_t | CFastLocalTime::m_LastSysTime |
Last system time. More... | |
int | CFastLocalTime::m_Timezone |
Cached timezone adjustment for local time. More... | |
int | CFastLocalTime::m_Daylight |
Cached system daylight information. More... | |
void *volatile | CFastLocalTime::m_IsTuneup |
(bool) Tuneup() in progress (MT) More... | |
double | CStopWatch::m_Start |
Start time value. More... | |
double | CStopWatch::m_Total |
Accumulated elapsed time. More... | |
EStart | CStopWatch::m_State |
Stopwatch state (started/stopped) More... | |
Friends | |
class | CTime::CFastLocalTime |
Definition at line 1243 of file ncbitime.hpp.
#define NCBI_TIME_EMPTY_BITFIELD unsigned : 0; |
Definition at line 1244 of file ncbitime.hpp.
typedef CDeadline CAbsTimeout |
Definition at line 1880 of file ncbitime.hpp.
typedef struct TDBTimeI * TDBTimeIPtr |
typedef struct TDBTimeU * TDBTimeUPtr |
typedef unsigned int CTimeFormat::TFlags |
Binary OR of "EFlags".
Definition at line 185 of file ncbitime.hpp.
Number of seconds.
Definition at line 80 of file ncbitime.hpp.
typedef unsigned int CTimeSpan::TSmartStringFlags |
Binary OR of "ESmartStringFlags".
Definition at line 1499 of file ncbitime.hpp.
anonymous enum |
Current timezone. Used in AsString() method.
Enumerator | |
---|---|
eCurrentTimeZone |
Definition at line 312 of file ncbitime.hpp.
enum CTime::EDaylight |
Whether to adjust for daylight saving time.
Enumerator | |
---|---|
eIgnoreDaylight | Ignore daylight saving time. |
eAdjustDaylight | Adjust for daylight saving time. |
eDaylightDefault |
Definition at line 367 of file ncbitime.hpp.
enum CTime::EDayOfWeek |
Day of week names.
Enumerator | |
---|---|
eSunday | |
eMonday | |
eTuesday | |
eWednesday | |
eThursday | |
eFriday | |
eSaturday |
Definition at line 339 of file ncbitime.hpp.
|
private |
Defines how to behave on error.
Enumerator | |
---|---|
eErr_Throw | Throw an exception on error. |
eErr_NoThrow | Return default value on error. |
Definition at line 1193 of file ncbitime.hpp.
Error types that CTime can generate.
Enumerator | |
---|---|
eArgument | Bad function argument. |
eConvert | Error converting value from one format to another. |
eInvalid | Invalid time value. |
eFormat | Incorrect format. |
Definition at line 2078 of file ncbitime.hpp.
enum CTimeFormat::EFlags |
Flags.
Enumerator | |
---|---|
fFormat_Simple | Use single characters as format symbols. (default) |
fFormat_Ncbi | Specify each format symbol with a preceding symbol '$'. This can be useful if your format string includes output characters that otherwise can be treated as format symbols. To include symbol '$' use '$$'. |
fMatch_Strict | A time string should strictly match the format string. eg "Y" and "1997" |
fMatch_ShortTime | A time/format string can have extra trailing format symbols, that do not have matching symbols in the time string. Any missed time components will be initialized by default in the time object. eg "Y/M/D h:m:s" and "1997" |
fMatch_ShortFormat | eg "Y" and "1997/07/16" |
fMatch_Weak | Combination of both modes above. Note that it matches until time or format string have symbols. It not allow unprocessed symbols left in both time and format strings at the same time. |
fMatch_IgnoreSpaces | Ignore all white spaces in the time and format strings on the matching/parsing step (CTime only). Use it for backward compatibility with old code only. Don't recommended to use, can lead to odd results and incorrect time on parsing some time strings. |
fConf_UTC | Prefer "UTC" over "GMT" abbreviation for universal time. Used for output purposes only, parsing accept both. |
fDefault | Default flags. |
eNcbiSimple | "Enum"s, used for backward compatibility. Please use flags instead. |
eNcbi | |
eDefault |
Definition at line 139 of file ncbitime.hpp.
enum CTime::EInitMode |
Which initial value to use for time.
Enumerator | |
---|---|
eCurrent | Use current time. See also CCurrentTime. |
eEmpty | Use "empty" time. |
Definition at line 299 of file ncbitime.hpp.
enum CTime::EMonth |
Month names.
Enumerator | |
---|---|
eJanuary | |
eFebruary | |
eMarch | |
eApril | |
eMay | |
eJune | |
eJuly | |
eAugust | |
eSeptember | |
eOctober | |
eNovember | |
eDecember |
Definition at line 323 of file ncbitime.hpp.
enum CTime::ENameFormat |
Which format use to get name of month or week of day.
Enumerator | |
---|---|
eFull | Use full name. |
eAbbr | Use abbreviated name. |
Definition at line 317 of file ncbitime.hpp.
Predefined formats.
Definition at line 190 of file ncbitime.hpp.
Precision for rounding time.
Definition at line 982 of file ncbitime.hpp.
AsSmartString() conversion flags.
Definition at line 1440 of file ncbitime.hpp.
Precision for span "smart" string.
Used in AsSmartString() method.
Definition at line 1503 of file ncbitime.hpp.
Which format use to output zero time span parts.
Enumerator | |
---|---|
eSSZ_NoSkipZero | Print zero valued parts. |
eSSZ_SkipZero | Skip zero valued parts. |
Definition at line 1526 of file ncbitime.hpp.
enum CStopWatch::EStart |
Defines how to create new timer.
Enumerator | |
---|---|
eStart | Start timer immediately after creating. |
eStop | Do not start timer, just create it. |
Definition at line 1940 of file ncbitime.hpp.
enum CTime::ETimeZone |
Which initial value to use for timezone.
Enumerator | |
---|---|
eLocal | Local time. |
eUTC | UTC (Universal Coordinated Time) |
eGmt | GMT (Greenwich Mean Time) |
Definition at line 305 of file ncbitime.hpp.
What time zone precision to use for adjusting daylight saving time.
Controls when (if ever) to adjust for the daylight saving time (only if the time is represented in local timezone format).
NOTE: if diff between previous time value and the time after manipulation is greater than this range, then try apply daylight saving conversion on the result time value.
Enumerator | |
---|---|
eNone | Daylight saving not to affect time manipulations. |
eMinute | Check condition - new minute. |
eHour | Check condition - new hour. |
eDay | Check condition - new day. |
eMonth | Check condition - new month. |
eTZPrecisionDefault |
Definition at line 357 of file ncbitime.hpp.
enum CTimeout::EType |
Type of timeouts.
Enumerator | |
---|---|
eFinite | A finite timeout value has been set. |
eDefault | Default timeout (to be interpreted by the client code) |
eInfinite | Infinite timeout. |
eZero | Zero timeout, equal to CTimeout(0,0). |
Definition at line 1696 of file ncbitime.hpp.
enum CDeadline::EType : unsigned |
Type of special deadlines.
Enumerator | |
---|---|
eInfinite | Infinite deadline. |
eNoWait | No-wait, expires immediately. |
Definition at line 1833 of file ncbitime.hpp.
Definition at line 2136 of file ncbitime.hpp.
CTime & CTime::AddDay | ( | int | days = 1 , |
EDaylight | adl = eDaylightDefault |
||
) |
Add specified days and adjust for daylight saving time.
days | Days to add. Default is 1 day. If negative, it will result in a "subtraction" operation. |
adl | Whether to adjust for daylight saving time. Default is to adjust for daylight saving time. This parameter is for eLocal time zone and where the time zone precision is not eNone. |
Definition at line 1788 of file ncbitime.cpp.
References CTime::CTime(), CTime::eAdjustDaylight, CTime::IsEmptyDate(), kEmptyStr, NCBI_THROW, s_Date2Number(), s_Number2Date(), CTime::x_AdjustTime(), and CTime::x_NeedAdjustTime().
Referenced by CTime::Round(), CTime::SetTimeDBI(), CTime::SetTimeDBU(), and CTime::x_AddHour().
Definition at line 2143 of file ncbitime.hpp.
|
inline |
Add specified hours and adjust for daylight saving time.
hours | Hours to add. Default is 1 hour. If negative, it will result in a "subtraction" operation. |
adl | Whether to adjust for daylight saving time. Default is to adjust for daylight saving time. This parameter is for eLocal time zone and where the time zone precision is not eNone. |
Definition at line 2371 of file ncbitime.hpp.
References CTime::x_AddHour().
Referenced by CTime::AddMinute(), CPileUpGraph::CPileUpGraph(), CSparseGraph::CSparseGraph(), and CTime::Round().
Definition at line 2150 of file ncbitime.hpp.
CTime & CTime::AddMinute | ( | int | minutes = 1 , |
EDaylight | adl = eDaylightDefault |
||
) |
Add specified minutes and adjust for daylight saving time.
minutes | Minutes to add. Default is 1 minute. If negative, it will result in a "subtraction" operation. |
adl | Whether to adjust for daylight saving time. Default is to adjust for daylight saving time. This parameter is for eLocal time zone and where the time zone precision is not eNone. |
Definition at line 1850 of file ncbitime.cpp.
References CTime::AddHour(), CTime::CTime(), CTime::eAdjustDaylight, CTime::eIgnoreDaylight, CTime::IsEmptyDate(), kEmptyStr, CTime::Minute(), NCBI_THROW, s_Offset(), SET_MIN, CTime::x_AdjustTime(), and CTime::x_NeedAdjustTime().
Referenced by CTime::AddSecond(), CTime::Round(), and CTime::SetTimeDBU().
Definition at line 2129 of file ncbitime.hpp.
CTime & CTime::AddMonth | ( | int | months = 1 , |
EDaylight | adl = eDaylightDefault |
||
) |
Add specified months and adjust for daylight saving time.
Beware that this operation is inherently inconsistent. In case of different number of days in the months, the day number can change, e.g.:
months | Months to add. Default is 1 month. If negative, it will result in a "subtraction" operation. |
adl | Whether to adjust for daylight saving time. Default is to adjust for daylight savings time. This parameter is for eLocal time zone and where the time zone precision is not eNone. |
Definition at line 1757 of file ncbitime.cpp.
References CTime::CTime(), CTime::eAdjustDaylight, CTime::IsEmptyDate(), kEmptyStr, CTime::Month(), months, NCBI_THROW, s_Offset(), SET_MONTH, SET_YEAR, CTime::x_AdjustDay(), CTime::x_AdjustTime(), CTime::x_NeedAdjustTime(), and CTime::Year().
Referenced by CTime::AddYear().
Definition at line 2164 of file ncbitime.hpp.
CTime & CTime::AddNanoSecond | ( | long | nanoseconds = 1 | ) |
Add specified nanoseconds.
nanoseconds | Nanoseconds to add. Default is 1 nanosecond. If negative, it will result in a "subtraction" operation. |
Definition at line 1896 of file ncbitime.cpp.
References CTime::AddSecond(), CTime::IsEmptyDate(), kNanoSecondsPerSecond, CTime::m_Data, CTime::TData::nanosec, CTime::NanoSecond(), NCBI_THROW, and s_Offset().
Referenced by CTime::AddTimeSpan(), CSimpleRebalanceStrategy::NeedRebalance(), and CTime::SetTimeDBI().
Definition at line 2157 of file ncbitime.hpp.
CTime & CTime::AddSecond | ( | TSeconds | seconds = 1 , |
EDaylight | adl = eDaylightDefault |
||
) |
Add specified seconds.
seconds | Seconds to add. Default is 1 second. If negative, it will result in a "subtraction" operation. |
Definition at line 1880 of file ncbitime.cpp.
References CTime::AddMinute(), CTime::IsEmptyDate(), NCBI_THROW, s_Offset(), CTime::Second(), and SET_SEC.
Referenced by CCgiApplication::AddLBCookie(), CTime::AddNanoSecond(), CTime::AddTimeSpan(), SThrottleStats::Adjust(), CTime::AsString(), CApplogUrl::ComposeUrl(), CFastLocalTime::GetLocalTime(), CHttpCookie::Parse(), CTime::Round(), s_ParseDateTime(), CTime::SetTimeDBI(), CTime::x_Init(), and CPoolBalancer::x_InitFromCounts().
Add specified time span.
timespan | Object of CTimeSpan class to add. If negative, it will result in a "subtraction" operation. |
Definition at line 1912 of file ncbitime.cpp.
References CTime::AddNanoSecond(), CTime::AddSecond(), eZero, CTimeSpan::GetCompleteSeconds(), CTimeSpan::GetNanoSecondsAfterSecond(), and CTimeSpan::GetSign().
Referenced by CTime::operator+=(), CTime::operator-=(), and CReader::SetNewConnectionDelayMicroSec().
Definition at line 2122 of file ncbitime.hpp.
|
inline |
Add specified years and adjust for daylight saving time.
It is an exact equivalent of calling AddMonth(years * 12).
Definition at line 2292 of file ncbitime.hpp.
References CTime::AddMonth().
Referenced by CCgiSession::GetSessionCookie(), and CCgiResponse::SetTrackingCookie().
Assign value to time span object from string representation of time in formats produced by AsSmartString().
str | String representation of time span in the format produced by AsSmartString(). All numeric time parts should have letter/word specifiers. The string should represent "positive" timespan, the sign (minus) is not allowed there. |
Definition at line 3263 of file ncbitime.cpp.
References _ASSERT, _TROUBLE, CTimeSpan::Clear(), eDay, eHour, eMicrosecond, eMillisecond, eMinute, eMonth, eNanosecond, eSecond, eYear, i, isalpha(), isdigit(), isspace(), kNanoSecondsPerSecond, kTimeSpanUnitMultipliers, kUnitCount, kUnitNames, CTimeSpan::m_NanoSec, CTimeSpan::m_Sec, n, NCBI_THROW, NStr::NumericToString(), str(), NStr::StringToULong(), NStr::ToLower(), rapidjson::value, and CTimeSpan::x_Normalize().
Referenced by CNcbiApplogApp::Run().
|
inline |
Transform elapsed time to "smart" string.
For more details see CTimeSpan::AsSmartString().
precision | Enum value describing how many parts of time span should be returned. |
rounding | Rounding mode. |
zero_mode | Mode to print or skip zero parts of time span. |
Definition at line 2850 of file ncbitime.hpp.
References CTimeSpan::AsSmartString(), CStopWatch::Elapsed(), eRound, CTimeSpan::eSSZ_NoSkipZero, flags, CTimeSpan::fSS_NoSkipZero, CTimeSpan::fSS_Round, CTimeSpan::fSS_SkipZero, CTimeSpan::fSS_Trunc, and precision.
Referenced by CBlastDbBioseqSource::CBlastDbBioseqSource(), CNetBLASTUIDataSource::Close(), CConnTestThread::Main(), CSeqGraphicWidget::OnDataChanged(), CAppDialogs::OpenViewlDialog(), CAnnotMetaDataJob::Run(), CBlastVdbCmdApp::x_FormatRuntime(), CNAUtils::x_GetAllNAIds(), CNAUtils::x_GetNAMetaData(), and BlastdbCopyApplication::x_MakeDBwIDList().
|
inline |
Transform elapsed time to "smart" string.
For more details see CTimeSpan::AsSmartString().
flags | How to convert string to value. |
Definition at line 2866 of file ncbitime.hpp.
References CTimeSpan::AsSmartString(), CStopWatch::Elapsed(), and flags.
|
inline |
Transform time span to "smart" string.
Definition at line 2688 of file ncbitime.hpp.
References eRound, CTimeSpan::eSSZ_NoSkipZero, flags, CTimeSpan::fSS_NoSkipZero, CTimeSpan::fSS_Round, CTimeSpan::fSS_SkipZero, CTimeSpan::fSS_Trunc, and precision.
Referenced by CThreadPool_Impl::Abort(), CStopWatch::AsSmartString(), CNSTServiceProperties::GetTTLAsString(), CBlastMasterNode::Processing(), CNSTServiceProperties::x_GetProlongAsString(), and CNetStorageHandler::x_ProcessGetObjectInfo().
string CTimeSpan::AsSmartString | ( | TSmartStringFlags | flags = 0 | ) | const |
Transform time span to "smart" string.
flags | How to convert string to value. |
Definition at line 3189 of file ncbitime.cpp.
References _ASSERT, CTimeSpan::CTimeSpan(), eNegative, f, flags, CTimeSpan::fSS_Day, CTimeSpan::fSS_Full, CTimeSpan::fSS_Hour, CTimeSpan::fSS_Microsecond, CTimeSpan::fSS_Millisecond, CTimeSpan::fSS_Minute, CTimeSpan::fSS_Month, CTimeSpan::fSS_Nanosecond, CTimeSpan::fSS_NoSkipZero, CTimeSpan::fSS_Precision1, CTimeSpan::fSS_Precision2, CTimeSpan::fSS_Precision3, CTimeSpan::fSS_Precision4, CTimeSpan::fSS_Precision5, CTimeSpan::fSS_Precision6, CTimeSpan::fSS_Precision7, CTimeSpan::fSS_PrecisionMask, CTimeSpan::fSS_Round, CTimeSpan::fSS_Second, CTimeSpan::fSS_Short, CTimeSpan::fSS_SkipZero, CTimeSpan::fSS_Smart, CTimeSpan::fSS_Trunc, CTimeSpan::fSS_Year, CTimeSpan::GetSign(), NCBI_THROW, CTimeSpan::x_AsSmartString_Precision(), CTimeSpan::x_AsSmartString_Smart_Big(), and CTimeSpan::x_AsSmartString_Smart_Small().
string CTimeSpan::AsString | ( | const CTimeFormat & | fmt = kEmptyStr | ) | const |
Transform time span to string.
fmt | Format specifier used to convert time span to string. If format is not defined, then GetFormat() will be used. |
Definition at line 2681 of file ncbitime.cpp.
References abs, eNegative, f, CTimeFormat::fFormat_Simple, format, CTimeSpan::GetCompleteDays(), CTimeSpan::GetCompleteHours(), CTimeSpan::GetCompleteMinutes(), CTimeSpan::GetCompleteSeconds(), CTimeSpan::GetFormat(), CTimeSpan::GetNanoSecondsAfterSecond(), CTimeSpan::GetSign(), ITERATE, kFormatEscapeSymbol, s_AddInt(), s_AddZeroPadInt(), s_AddZeroPadInt2(), str(), CTimeSpan::x_Hour(), CTimeSpan::x_Minute(), and CTimeSpan::x_Second().
Referenced by CStopWatch::AsString(), CCgiStatistics::Compose_Timing(), CCgi2RCgiApp::PopulatePage(), CPeriodicTestJob::Run(), CTimeout::Set(), SNetStorageObjectRPC::SetExpiration(), and sToUserFriendlyString().
string CStopWatch::AsString | ( | const CTimeFormat & | fmt = kEmptyStr | ) | const |
Transform stopwatch time to string.
According to used OS, the double representation can provide much finer grained time control. The string representation is limited by nanoseconds.
fmt | If format is not defined, then GetFormat() will be used. Format specifier used to convert value returned by Elapsed() to string. |
Definition at line 4149 of file ncbitime.cpp.
References CTimeSpan::AsString(), CStopWatch::Elapsed(), CStopWatch::GetFormat(), and CTimeFormat::IsEmpty().
Referenced by CMacroWorker::ExecuteMacros(), CDiagContext::GetProperty(), operator<<(), and CSequenceInputStats::PrintReport().
string CTime::AsString | ( | const CTimeFormat & | format = kEmptyStr , |
TSeconds | out_tz = eCurrentTimeZone |
||
) | const |
Transform time to string.
format | Format specifier used to convert time to string. If "format" is not defined, then GetFormat() will be used. |
out_tz | Output timezone. This is a difference in seconds between universal and local time for some place (for example, for EST5 timezone its value is 18000). This parameter works only with local time. If the time object contains universal (GMT/UTC/Z) time it is ignored. Before doing transformation to string, the time will be converted to the output timezone. Timezone can be printed as a string 'GMT/UTC/Z[+|-]HHMM' using the format symbol 'z'. By default the current timezone is used. |
Definition at line 1512 of file ncbitime.cpp.
References STzFormatMake::activate(), STzFormatMake::active(), CTime::AddSecond(), CTime::CTime(), DSTBias, CTime::eCurrentTimeZone, ERR_POST_X, f, CTimeFormat::fConf_UTC, CTimeFormat::fFormat_Simple, format, CTime::GetFormat(), CTime::IsEmpty(), CTime::IsUniversalTime(), CTime::IsValid(), ITERATE, kEmptyStr, kFormatEscapeSymbol, kMonthAbbr, kMonthFull, kWeekdayAbbr, kWeekdayFull, NCBI_THROW, NPOS, s_AddInt(), s_AddZeroPadInt(), s_AddZeroPadInt2(), s_IsDST(), s_TimeDump(), str(), STzFormatMake::str(), t, and TimeZone.
Referenced by CRtProfiler::AddMarkerMT(), SThrottleStats::Adjust(), Convert::CassValueConvert< string >(), CBuildDatabase::CBuildDatabase(), CDbapiSampleApp::CDbapiSampleApp(), CNCHeartBeat::CheckConfFile(), CCgiStatistics::Compose_Timing(), CApplogUrl::ComposeUrl(), CPepXML::ConvertFromOMSSA(), CFeatureGenerator::ConvertLocToAnnot(), CWriteDB_ColumnIndex::CWriteDB_ColumnIndex(), CWriteDB_ConsolidateAliasFiles(), CWriteDB_CreateAliasFile(), CWriteDB_GiMaskIndex::CWriteDB_GiMaskIndex(), CWriteDB_Impl::CWriteDB_Impl(), CDbapiSimpleApp::DemoDynamicSql(), CSdbapiSimpleApp::DemoDynamicSql(), CwxLogDiagHandler::DoLogRecord(), CBDB_Cache::EvaluateTimeLine(), CDbapiTestSpeedApp::FetchFile(), CFeedbackReport::Format(), CProjBulderApp::GenerateUnixProjects(), CAlignFormatUtil::GetBlastDbInfo(), CSeqDB::GetDBMetaData(), CHttpCookie::GetExpirationStr(), CGBenchVersionInfo::GetLabel(), GetNetBlastJobDescription(), CELink_Request::GetQueryString(), CESearch_Request::GetQueryString(), CFileModules::GetRefInfo(), CVariant::GetString(), SLazyInitData::GetTime(), CEventViewModel::GetValueAt(), NS_FormatPreciseTime(), NST_FormatPreciseTime(), CPubseqGatewayApp::OnInfo(), operator<<(), CCgi2RCgiApp::PopulatePage(), CPerfLogger::Post(), CWNJobWatcher::Print(), CGridCommandLineInterfaceApp::PrintBlobMeta(), CSplitCacheApp::PrintVersion(), CBDB_Cache::Purge(), CCkblastindexApplication::Run(), CBlastKmerBuildIndexApplication::Run(), CXcompareAnnotsApplication::Run(), CAsnSubCacheCreateApplication::Run(), COcbdDemoApp::Run(), CCtlLibDemoAPp::RunSample(), s_ConvertV4toV5(), s_ConvertValue(), s_CreateAliasFilePriv(), s_DumpHeader(), s_ExpandProjectFolder(), s_FormatDate(), s_GetBlobMeta(), s_ListProjectFolder(), CGenBankLoadOptionPanel::SaveMruAccessions(), CProjectService::SaveSettings(), CFileLoadManager::SaveSettings(), CFileLoadMRUList::SaveToStrings(), CCgiResponse::SetHeaderValue(), CDate::SetToTime(), sFormatTimePeriod(), IBISInteraction::ToAlignAnnot(), CBlobStatusHistoryRecord::ToString(), CNetBlastJobDescriptor::ToUserObject(), CFeatureGenerator::SImplementation::TransformProteinAlignToTranscript(), WriteBlastSeqidlistFile(), CBlastDBAliasApp::x_AddVDBsToAliasFile(), CRotatingLogStream::x_BackupName(), CMessageSlotPopupWindow::x_CreateMessageSlotPanel(), CFeatureGenerator::SImplementation::x_CreateMrnaBioseq(), CCreateNeedlemanWunschJob::x_CreateProjectItems(), CFeatureGenerator::SImplementation::x_CreateProteinBioseq(), CAsnSubCacheCreateApplication::x_GetBioseqHandle(), CAgpFastaComparator::CTmpSeqVecStorage::x_GetTmpDir(), SDiagMessage::x_OldWrite(), CNetScheduleHandler::x_ProcessHealth(), CNetScheduleHandler::x_ProcessStatistics(), and CStartItem::x_SetDate().
Constructor.
tz | Whether to use local time (default, CTime::eLocal) or Universal Coordinated Time (CTime::eUTC). |
Definition at line 1289 of file ncbitime.hpp.
Initialize deadline by adding relative timeout to the current time.
Definition at line 3777 of file ncbitime.cpp.
References CTimeout::Get(), CTimeout::IsDefault(), CTimeout::IsFinite(), CTimeout::IsInfinite(), CTimeout::IsZero(), kMicroSecondsPerSecond, kNanoSecondsPerSecond, CDeadline::m_Infinite, NCBI_THROW, and CDeadline::x_SetNowPlus().
|
private |
Initialize deadline of specified type.
Definition at line 3761 of file ncbitime.cpp.
Initialize deadline using seconds and nanoseconds (adding to the current time)
seconds | Number of seconds to add to the current time |
nanoseconds | Number of nanoseconds to add to the current time |
Definition at line 3767 of file ncbitime.cpp.
References CDeadline::x_SetNowPlus().
CFastLocalTime::CFastLocalTime | ( | unsigned int | sec_after_hour = 5 | ) |
Constructor.
It should not try to get local time from OS more often than once an hour. Default: check once, 5 seconds after each hour.
Definition at line 3925 of file ncbitime.cpp.
References Daylight, CTime::eHour, int, CFastLocalTime::m_Daylight, CFastLocalTime::m_LocalTime, CFastLocalTime::m_Timezone, CFastLocalTime::m_TunedTime, CGuard< Resource, Lock, Unlock, ReportExceptions >::Release(), CTime::SetTimeZonePrecision(), and TimeZone.
CTime & CTime::Clear | ( | void | ) |
Make the time "empty",.
Definition at line 1999 of file ncbitime.cpp.
References CTime::TData::adjTimeDiff, CTime::TData::day, CTime::TData::hour, CTime::m_Data, CTime::TData::min, CTime::TData::month, CTime::TData::nanosec, CTime::TData::sec, and CTime::TData::year.
Referenced by CVariant::GetCTime(), impl::CDriverContext::MakeCDBConnection(), CHttpCookie::Parse(), CHttpCookie::Reset(), CTimeFunctions::SetDefault(), CReader::WaitBeforeNewConnection(), and CTime::x_Init().
|
inline |
Make the time span "empty",.
Definition at line 2522 of file ncbitime.hpp.
References CTimeSpan::m_NanoSec, and CTimeSpan::m_Sec.
Referenced by CTimeSpan::AssignFromSmartString(), CTimeSpan::CTimeSpan(), CRetryContext::ResetDelay(), and CTimeSpan::x_Init().
Definition at line 1812 of file ncbitime.hpp.
References CTimeout::SetNano().
CStopWatch::CStopWatch | ( | bool | start | ) |
Constructor.
Start timer if argument is true.
Definition at line 4084 of file ncbitime.cpp.
References CStopWatch::eStop, CStopWatch::m_Start, CStopWatch::m_State, CStopWatch::m_Total, and CStopWatch::Start().
Constructor.
NB. By default ctor doesn't start timer, it merely creates it.
Definition at line 2753 of file ncbitime.hpp.
References CStopWatch::eStart, CStopWatch::eStop, CStopWatch::m_Start, CStopWatch::m_State, CStopWatch::m_Total, and CStopWatch::Start().
|
explicit |
Explicit conversion constructor for string representation of time.
Construct time object from string representation of time.
str | String representation of time in format "fmt". |
fmt | Format in which "str" is presented. Default value of kEmptyStr, implies the format, that was previously setup using SetFormat() method, or default "M/D/Y h:m:s". |
tz | If current format contains 'Z', then objects timezone will be set to:
|
Definition at line 1014 of file ncbitime.cpp.
References _ASSERT, CTime::eGmt, CTime::eLocal, CTime::eUTC, CTime::GetFormat(), CTimeFormat::IsEmpty(), CTime::m_Data, str(), CTime::TData::tz, CTime::TData::tzprec, and CTime::x_Init().
CTime::CTime | ( | const struct tm & | t, |
ETimeZonePrecision | tzp = eTZPrecisionDefault |
||
) |
Conversion constructor for "struct tm" local time representation.
Construct time object from "struct tm" time value. The constructed object will be in the eLocal format.
t | Time in "struct tm" format. |
tzp | What time zone precision to use. |
Definition at line 1005 of file ncbitime.cpp.
References CTime::eLocal, CTime::m_Data, CTime::SetTimeTM(), t, CTime::TData::tz, and CTime::TData::tzprec.
CTime::CTime | ( | EInitMode | mode = eEmpty , |
ETimeZone | tz = eLocal , |
||
ETimeZonePrecision | tzp = eTZPrecisionDefault |
||
) |
Constructor.
mode | Whether to build time object with current time or empty time (default). |
tz | Whether to use local time (default) or UTC. |
tzp | What time zone precision to use. |
Definition at line 985 of file ncbitime.cpp.
References CTime::eCurrent, CTime::m_Data, CTime::SetCurrent(), CTime::TData::tz, and CTime::TData::tzprec.
Referenced by CTime::AddDay(), CTime::AddMinute(), CTime::AddMonth(), CTime::AsString(), CTime::CTime(), CTime::GetTimeDBI(), CTime::GetTimeDBU(), CTime::x_AddHour(), and CTime::YearDayNumber().
CTime::CTime | ( | int | year, |
int | month, | ||
int | day, | ||
int | hour = 0 , |
||
int | minute = 0 , |
||
int | second = 0 , |
||
long | nanosecond = 0 , |
||
ETimeZone | tz = eLocal , |
||
ETimeZonePrecision | tzp = eTZPrecisionDefault |
||
) |
Constructor.
Construct time given the year, month, day, hour, minute, second, nanosecond parts of a time value.
year | Year part of time. |
month | Month part of time. Note month starts from 1. |
day | Day part of time. Note day starts from 1. |
hour | Hour part of time. |
minute | Minute part of time. |
second | Second part of time. |
nanosecond | Nanosecond part of time. |
tz | Whether to use local time (default) or UTC. |
tzp | What time zone precision to use. |
Definition at line 952 of file ncbitime.cpp.
References CTime::TData::adjTimeDiff, CHECK_RANGE_DAY, CHECK_RANGE_HOUR, CHECK_RANGE_MIN, CHECK_RANGE_MONTH, CHECK_RANGE_NSEC, CHECK_RANGE_SEC, CHECK_RANGE_YEAR, CTime::IsValid(), CTime::m_Data, CTime::TData::nanosec, NCBI_THROW, s_TimeDump(), SET_DAY, SET_HOUR, SET_MIN, SET_MONTH, SET_SEC, SET_YEAR, CTime::TData::tz, and CTime::TData::tzprec.
CTime::CTime | ( | int | year, |
int | yearDayNumber, | ||
ETimeZone | tz = eLocal , |
||
ETimeZonePrecision | tzp = eTZPrecisionDefault |
||
) |
Constructor.
Construct date as N-th day of the year.
year | Year part of date. |
yearDayNumber | N-th day of the year. |
tz | Whether to use local time (default) or UTC. |
tzp | What time zone precision to use. |
Definition at line 436 of file ncbitime.cpp.
References CTime::CTime(), CTime::TData::day, CTime::m_Data, CTime::TData::month, t, CTime::TData::tz, CTime::TData::tzprec, and CTime::TData::year.
|
explicit |
Conversion constructor for time_t representation of time.
Construct time object from UTC time_t value. The constructed object will be in the eUTC format.
t | Time in the UTC time_t format. |
tzp | What time zone precision to use. |
Definition at line 996 of file ncbitime.cpp.
References CTime::eUTC, CTime::m_Data, CTime::SetTimeT(), t, CTime::TData::tz, and CTime::TData::tzprec.
Constructor.
Definition at line 340 of file ncbitime.cpp.
References flags, and CTimeFormat::SetFormat().
CTimeFormat::CTimeFormat | ( | const CTimeFormat & | fmt | ) |
Copy constructor.
Definition at line 334 of file ncbitime.cpp.
Constructor.
Definition at line 346 of file ncbitime.cpp.
References flags, and CTimeFormat::SetFormat().
CTimeFormat::CTimeFormat | ( | void | ) |
Default constructor.
Definition at line 327 of file ncbitime.cpp.
Referenced by CTimeFormat::GetPredefined().
Initialize timeout from CTimeSpan.
Definition at line 2714 of file ncbitime.hpp.
References CTimeout::Set().
|
inlineexplicit |
Initialize timeout from number of seconds (fractional value).
Definition at line 2720 of file ncbitime.hpp.
References CTimeout::Set().
|
inline |
Create timeout of specified type.
Definition at line 2711 of file ncbitime.hpp.
References CTimeout::Set().
Initialize timeout in seconds and microseconds.
Definition at line 2717 of file ncbitime.hpp.
References CTimeout::Set().
|
inline |
Create default timeout.
Definition at line 2708 of file ncbitime.hpp.
References CTimeout::eDefault, and CTimeout::Set().
Copy constructor.
Definition at line 2515 of file ncbitime.hpp.
References CTimeSpan::m_NanoSec, CTimeSpan::m_Sec, and t.
|
explicit |
Explicit conversion constructor for string representation of time span.
Construct time span object from string representation of time.
str | String representation of time span in format "fmt". |
fmt | Format in which "str" is presented. Default value of kEmptyStr, implies the format set with SetFormat(), or "-G" if SetFormat() has not used before. |
Definition at line 2447 of file ncbitime.cpp.
References CTimeFormat::IsEmpty(), kDefaultFormatSpanIn, s_TlsFormatSpan, str(), and CTimeSpan::x_Init().
|
inlineexplicit |
Constructor.
Construct time span from number of seconds. Please, use this constructor as rarely as possible, because after doing some arithmetical operations and conversion with it, the time span can differ at some nanoseconds from expected value.
seconds | Second part of time. The fractional part is used to compute nanoseconds. |
Definition at line 2509 of file ncbitime.hpp.
References CTimeSpan::Set().
CTimeSpan::CTimeSpan | ( | long | days, |
long | hours, | ||
long | minutes, | ||
long | seconds, | ||
long | nanoseconds = 0 |
||
) |
Constructor.
Construct time span given the number of days, hours, minutes, seconds, nanoseconds parts of a time span value.
days | Day part of time. Note day starts from 1. |
hours | Hour part of time. |
minutes | Minute part of time. |
seconds | Second part of time. |
nanoseconds | Nanosecond part of time. |
Definition at line 2427 of file ncbitime.cpp.
References NStr::Int8ToString(), kNanoSecondsPerSecond, CTimeSpan::m_NanoSec, CTimeSpan::m_Sec, NCBI_THROW, and CTimeSpan::x_Normalize().
|
inlineexplicit |
Constructor.
Construct time span given the number of seconds and nanoseconds.
seconds | Second part of time. |
nanoseconds | Nanosecond part of time. |
Definition at line 2503 of file ncbitime.hpp.
References CTimeSpan::Set().
|
inline |
Default constructor.
Definition at line 2496 of file ncbitime.hpp.
References CTimeSpan::Clear().
Referenced by CTimeSpan::AsSmartString(), CTimeSpan::x_AsSmartString_Precision(), CTimeSpan::x_AsSmartString_Smart_Big(), and CTimeSpan::x_AsSmartString_Smart_Small().
|
inline |
Definition at line 2184 of file ncbitime.hpp.
References CTime::eCurrent.
Referenced by BOOST_AUTO_TEST_CASE(), CSequenceEditingEventHandler::CreateSeqSubmit(), CDBConnectionFactory::CServiceInfo::GetOptions(), CDBConnectionFactory::MakeDBConnection(), CCgiApplication::ShouldRestart(), CCitSubUpdater::sx_GetCitSubForSequence(), CRotatingLogStream::x_BackupName(), CProSplignJob::x_CreateOneProjectItem(), CNGAlignJob::x_CreateProjectItems(), CSplignJob::x_CreateProjectItems(), CPoolBalancer::x_GetServer(), CNetStorageHandler::x_ProcessGetObjectInfo(), CAgpConverter::x_SetCreateAndUpdateDatesToToday(), CStartItem::x_SetDate(), CMacroFunction_SetPubStatus::x_SetStatus(), CSubmissionWizard::x_SetSubmissionDate(), and CBlockingQueue< TRequest >::x_WaitForPredicate().
|
inline |
Get day.
Day of the month = 1..31 AsString() format symbol "D".
Definition at line 2271 of file ncbitime.hpp.
References CTime::TData::day, and CTime::m_Data.
Referenced by python::ConvertCVariant2PCObject(), CTimeToTimeTms(), CTime::DayOfWeek(), CTime::IsEmpty(), CTime::IsValid(), CTime::operator<(), CTime::operator==(), CTime::operator>(), s_Date2Number(), s_TimeDump(), CCgiCookie::SetExpTime(), CDate_std::SetToTime(), CUser_object::UpdateNcbiCleanup(), CTime::x_AdjustDay(), and CTime::x_AdjustTime().
int CTime::DayOfWeek | ( | void | ) | const |
Get day of week.
Days since Sunday = 0..6 AsString() format symbols "W", "w".
Definition at line 1186 of file ncbitime.cpp.
References CTime::Day(), int, CTime::IsEmptyDate(), CTime::Month(), NCBI_THROW, and CTime::Year().
Referenced by CCgiCookie::SetExpTime(), CTime::x_Init(), and CTime::YearWeekNumber().
Get numerical value of the day of week by name.
day | Full or abbreviated day of week name. |
Definition at line 1241 of file ncbitime.cpp.
References NStr::CompareNocase(), i, kWeekdayAbbr, kWeekdayFull, and NCBI_THROW.
|
static |
Get name of the day of week by numerical value.
day | Full or abbreviated day of week name. |
format | Format for returned value (full or abbreviated). |
Definition at line 1259 of file ncbitime.cpp.
References CTime::eFull, kEmptyStr, kWeekdayAbbr, and kWeekdayFull.
int CTime::DaysInMonth | ( | void | ) | const |
Get number of days in the month.
Number of days = 28..31
Definition at line 1199 of file ncbitime.cpp.
References CTime::IsEmptyDate(), CTime::IsLeap(), CTime::Month(), NCBI_THROW, and s_DaysInMonth.
Referenced by CSubSource::IsDayValueOkForMonth(), CTime::SetDay(), CTime::SetMonth(), CTime::SetYear(), and CTime::x_AdjustDay().
Difference in days from specified time.
Definition at line 2393 of file ncbitime.hpp.
References CTime::DiffSecond(), and t.
Difference in hours from specified time.
Definition at line 2399 of file ncbitime.hpp.
References CTime::DiffSecond(), and t.
Difference in minutes from specified time.
Definition at line 2405 of file ncbitime.hpp.
References CTime::DiffSecond(), and t.
Difference in nanoseconds from specified time.
Definition at line 2411 of file ncbitime.hpp.
References CTime::DiffSecond(), kNanoSecondsPerSecond, CTime::NanoSecond(), and t.
Referenced by CSparseGraph::Init(), CReader::WaitBeforeNewConnection(), and CReader::x_AllocConnection().
Difference in seconds from specified time.
Definition at line 2282 of file ncbitime.cpp.
References CTime::DiffWholeDays(), CTime::GetTimeZone(), CTime::Hour(), CTime::Minute(), CTime::Second(), and CTime::ToUniversalTime().
Referenced by CCgiStatistics::Compose(), CTime::DiffDay(), CTime::DiffHour(), CTime::DiffMinute(), CTime::DiffNanoSecond(), and CTime::DiffTimeSpan().
Difference in nanoseconds from specified time.
Definition at line 2305 of file ncbitime.cpp.
References CTime::DiffSecond(), NStr::Int8ToString(), CTime::NanoSecond(), NCBI_THROW, and t.
Referenced by CCgiStatistics::Compose_Timing(), CServer_ConnectionPool::GetPollAndTimerVec(), CTime::operator-(), CPerfLogger::Suspend(), and x_FindLatestSequence().
Difference in whole days from specified time.
Definition at line 2277 of file ncbitime.cpp.
References int, s_Date2Number(), and t.
Referenced by CTime::DiffSecond(), and CTime::TimeZoneOffset().
|
inline |
Return time elapsed since first Start() or last Restart() call (in seconds).
Result is 0.0 if Start() or Restart() wasn't previously called.
Definition at line 2775 of file ncbitime.hpp.
References CStopWatch::eStop, CStopWatch::GetTimeMark(), CStopWatch::m_Start, CStopWatch::m_State, and CStopWatch::m_Total.
Referenced by CBuildDatabase::AddSequences(), CThreadPool_Impl::AddTask(), CNcbiTestApplication::AdjustTestTimeout(), CStopWatch::AsSmartString(), CStopWatch::AsString(), BOOST_AUTO_TEST_CASE(), IPhyloTreeRender::BufferedRender(), CBuildDatabase::Build(), CPhyloTreePS::CalcForces(), CBamFileInfo::CBamFileInfo(), CGlWidgetPane::CheckOverlayTimer(), CompressAssembly(), ConvertToPairwise(), CBDB_Cache::EvaluateTimeLine(), CExecute::Exec(), CChangePhyloTreeCommand::Execute(), CChangePhyloPropertyCmd::Execute(), CChangePhyloExpandCollapseCmd::Execute(), CQueryParsePanel::CQueryJob::Execute(), CMacroWorker::ExecuteMacros(), CSeqEntryPresenter::Finalize(), CFlatFileGenerator::Generate(), GetBlobReader(), CSNPDataLoader_Impl::GetChunkOnce(), CReaderRequestResultRecursion::GetCurrentRequestTime(), CPerfLogger::GetElapsedTime(), CSNPFileInfo::InitializeDb(), CProcess::Kill(), IPhyloTreeRender::Layout(), CBamRefSeqInfo::LoadAlignChunk(), CSNPDataLoader_Impl::LoadBlob(), CBamRefSeqInfo::LoadMainSplit(), CBamRefSeqInfo::LoadPileupChunk(), CBamRefSeqInfo::LoadSeqChunk(), CBDB_SplitTest::LoadSplitStore(), CBDB_SplitTest::LoadTestSet(), CPhyTreeView::OnBioTreeChanged(), CProjectTreePanel::OnDragOver(), CThreadPool_Controller_PID::OnEvent(), CUpdateMultiSeq_Dlg::OnIdle(), CPhyTreeView::OnSomethingEdited(), CNetBLASTUIDataSource::Open(), CGenBankUIDataSource::Open(), CSQLITE3_Cache::Open(), CAlignSort::SAlignExtractor::operator()(), CQueryExecEvalFunc::operator()(), CFileHandleDiagHandler::Post(), CFileDiagHandler::Post(), CPerfLogger::Post(), CSeqEntryPresenter::Process(), CBam2GraphApp::ProcessFile(), CBlastMasterNode::Processing(), CGlCgiImageApplication::ProcessRequest(), CBamIndex::Read(), CBiosampleChkApp::ReadClassMember(), CAsnvalThreadState::ReadClassMember(), CTreeGraphicsModel::Render(), IPhyloTreeRender::Render(), CFileHandleDiagHandler::Reopen(), CFileDiagHandler::Reopen(), CSeqDescrRetrievalJob::Run(), CAnnotMetaDataJob::Run(), CAsnCacheTestApplication::Run(), CCacheIndexCopyApp::Run(), CAsnSubCacheCreateApplication::Run(), CWalkAsnCacheApplication::Run(), CDemoApp::Run(), CMytestApplication::Run(), CProjBulderApp::Run(), CObjConvProfile::Run(), CSampleNetScheduleClient::Run(), CConvImageApp::Run(), CSubImageApp::Run(), CDbapiTestSpeedApp::RunSample(), s_GetDBTree(), s_Win_KillGroup(), CSparseGraph::Save(), CGBenchService::SendAppFinish(), CCachedTaxon3_impl::SendOrgRefList(), UncomressAndCreate(), CPhyloTreePS::Update(), CAsnvalThreadState::ValidateTraditionally(), CAsnvalThreadState::ValidateWorker(), CThread::WaitForAllThreads(), CTimeReporter::Write(), CAsnSubCacheCreateApplication::WriteBlobsInSubCache(), CFileHandleDiagHandler::WriteMessage(), CFileDiagHandler::WriteMessage(), CBuildDatabase::x_AddRemoteSequences(), CBamRefSeqInfo::x_AddSeqChunk(), CRequestRateControl::x_Approve(), CForceJob::x_Calculate(), CImportFeatTable::x_CreateCommand(), CAlnMultiDSBuilder::x_CreateSparseDataSource(), CComponentSearchJob::x_DoSearch(), CBuildDatabase::x_DupLocal(), CWorkerNodeIdleThread::x_GetIdleTimeIfShutdown(), CWorkerNodeIdleThread::x_GetInterval(), CRemoteBlast::x_GetRequestInfoFromRID(), CRemoteBlast::x_GetSubjects(), CCSRARefSeqInfo::x_LoadRangesStat(), CSyncQueue< Type, Container, Traits >::x_LockAndWait(), CWorkspaceAutoSaver::x_OnSave(), CReadIndexSpeedApp::x_PreReadIndex(), CNetScheduleHandler::x_ProcessMsgBatchSubmit(), CId2FetchApp::x_ProcessRequest(), CBGZFFile::x_ReadBlock(), CPagedFile::x_ReadPage(), CPhyloTreePane::x_Render(), IPhyloTreeRender::x_RenderTooltipHints(), CAnnot_Collector::x_SearchMapped(), CRemoteBlast::x_SendRequest(), IPhyloTreeRender::x_SetElementVisibility(), CAlignTabExportPage2::x_StartNAAlignNamesJob(), CThreadPool_Impl::x_WaitForPredicate(), CReadIndexSpeedApp::x_WalkIndex(), CEditObjectFeaturePropagate::xGetEditCommandAllSequences(), BlastdbCopyApplication::~BlastdbCopyApplication(), CBlastDBAliasApp::~CBlastDBAliasApp(), CBlastDbCheckApplication::~CBlastDbCheckApplication(), CBlastDBCmdApp::~CBlastDBCmdApp(), CBlastdbConvertApp::~CBlastdbConvertApp(), CBlastFormatterApp::~CBlastFormatterApp(), CBlastFormatterVdbApp::~CBlastFormatterVdbApp(), CBlastnApp::~CBlastnApp(), CBlastpApp::~CBlastpApp(), CBlastVdbCmdApp::~CBlastVdbCmdApp(), CBlastxApp::~CBlastxApp(), CConvert2BlastMaskApplication::~CConvert2BlastMaskApplication(), CDeltaBlastApp::~CDeltaBlastApp(), CMagicBlastApp::~CMagicBlastApp(), CMakeBlastDBApp::~CMakeBlastDBApp(), CMakeClusterDBApp::~CMakeClusterDBApp(), CMakeProfileDBApp::~CMakeProfileDBApp(), CMultiApplication::~CMultiApplication(), CPsiBlastApp::~CPsiBlastApp(), CRPSBlastApp::~CRPSBlastApp(), CRPSTBlastnApp::~CRPSTBlastnApp(), CTblastnApp::~CTblastnApp(), CTblastxApp::~CTblastxApp(), CVDBBlastnApp::~CVDBBlastnApp(), CVDBTblastnApp::~CVDBTblastnApp(), and SW::~SW().
Get timeout in seconds and microseconds.
Definition at line 3545 of file ncbitime.cpp.
References CTimeout::IsFinite(), kMicroSecondsPerSecond, kNanoSecondsPerSecond, CTimeout::m_NanoSec, CTimeout::m_Sec, CTimeout::m_Type, NCBI_THROW, and s_SpecialValueName().
Referenced by CDeadline::CDeadline(), g_CTimeoutToSTimeout(), CCgiContext::GetStreamStatus(), SNetServerImpl::SConnectDeadline::IsExpired(), and CNetScheduleNotificationHandler::WaitForNotification().
|
inline |
Return time span as number of seconds.
Definition at line 2565 of file ncbitime.hpp.
References kNanoSecondsPerSecond, CTimeSpan::m_NanoSec, and CTimeSpan::m_Sec.
Referenced by CThreadPool_Impl::AddTask(), CPerfLogger::Adjust(), CNSTDatabase::ExecSP_SetExpiration(), CRequestRateControl::Reset(), s_ProgressCallback(), s_TimerCallback(), CPerfLogger::Suspend(), CRPCClient_Base::x_Ask(), CNSTServiceProperties::x_GetProlongInTTLs(), CRPCClient_Base::x_GetRetryDelay(), and CThreadPool_Impl::x_WaitForPredicate().
double CTimeout::GetAsDouble | ( | void | ) | const |
Get as number of seconds (fractional value).
Definition at line 3512 of file ncbitime.cpp.
References CTimeout::IsFinite(), kNanoSecondsPerSecond, CTimeout::m_NanoSec, CTimeout::m_Sec, CTimeout::m_Type, NCBI_THROW, and s_SpecialValueName().
Referenced by CNetScheduleNotificationHandler::CmdAppendTimeoutGroupAndClientInfo(), SNetServerImpl::ConnectImpl(), CTimer::PresetSeconds(), CNetICacheClientExt::ProlongBlobLifetime(), CNetScheduleNotificationHandler::RequestJobWatching(), SNetStorage_NetCacheBlob::SetExpiration(), CNSTDatabase::SetParameters(), CUsageReportAPI::SetTimeout(), and CNetStorageHandler::x_ProcessConfiguration().
unsigned long CTimeout::GetAsMilliSeconds | ( | void | ) | const |
Get as number of milliseconds.
Definition at line 3490 of file ncbitime.cpp.
References CTimeout::IsFinite(), kMilliSecondsPerSecond, kNanoSecondsPerSecond, CTimeout::m_NanoSec, CTimeout::m_Sec, CTimeout::m_Type, NCBI_THROW, s_SpecialValueName(), and NStr::UIntToString().
Referenced by SNetServerImpl::ConnectAndExec(), CCgiContext::GetStreamStatus(), SNetServiceImpl::IterateUntilExecOK(), CInterProcessLock::Lock(), SRetryProcessing::operator()(), s_PeekStdin(), CRWLock::TryReadLock(), CRWLock::TryWriteLock(), CThread::WaitForAllThreads(), CConditionVariable::x_WaitForSignal(), and CAsyncWriteCache::~CAsyncWriteCache().
CTimeSpan CTimeout::GetAsTimeSpan | ( | void | ) | const |
Definition at line 3523 of file ncbitime.cpp.
References CTimeout::IsFinite(), CTimeout::m_NanoSec, CTimeout::m_Sec, CTimeout::m_Type, NCBI_THROW, s_SpecialValueName(), and NStr::UIntToString().
Referenced by SNetStorageObjectRPC::SetExpiration().
|
inline |
Get number of complete days.
Definition at line 2550 of file ncbitime.hpp.
References CTimeSpan::m_Sec.
Referenced by CTimeSpan::AsString().
|
inline |
Get number of complete hours.
Definition at line 2553 of file ncbitime.hpp.
References CTimeSpan::m_Sec.
Referenced by CTimeSpan::AsString().
|
inline |
Get number of complete minutes.
Definition at line 2556 of file ncbitime.hpp.
References CTimeSpan::m_Sec.
Referenced by CTimeSpan::AsString().
|
inline |
Get number of complete seconds.
Definition at line 2559 of file ncbitime.hpp.
References CTimeSpan::m_Sec.
Referenced by CTime::AddTimeSpan(), CTimeSpan::AsString(), CServer_ConnectionPool::GetPollAndTimerVec(), s_ProgressCallback(), CTimeout::Set(), CRequestRateControl::Sleep(), CSrvDiagMsg::StopRequest(), sToUserFriendlyString(), CRPCClient_Base::x_Ask(), CTimeSpan::x_AsSmartString_Precision(), CTimeSpan::x_AsSmartString_Smart_Big(), CThreadPool_ServiceThread::x_Idle(), and CBlockingQueue< TRequest >::x_WaitForPredicate().
|
static |
Get current UTC time in time_t format (with nanoseconds).
sec | The function return the number of seconds elapsed since midnight (00:00:00), January 1, 1970 UTC. |
nanosec | Number of nanoseconds (0, if not possible to get). |
Definition at line 1672 of file ncbitime.cpp.
References _ASSERT, kMicroSecondsPerSecond, kNanoSecondsPerSecond, NCBI_CONST_UINT8, and NCBI_THROW.
Referenced by CFastLocalTime::GetLocalTime(), CFastLocalTime::GetLocalTimezone(), CMacroStat::LogStart(), CMacroStat::LogStop(), CNcbiApplogApp::Redirect(), CNcbiApplogApp::SetInfo(), CFastLocalTime::Tuneup(), CNcbiEncrypt::x_AddSalt(), CTar::x_Append(), CCDDClientPool::x_GetClient(), CCDDClientPool::x_ReleaseClient(), and CTime::x_SetTime().
|
overridevirtual |
Translate from the error code value to its string representation.
Reimplemented from CCoreException.
Definition at line 4178 of file ncbitime.cpp.
References CTimeException::eArgument, CTimeException::eConvert, CTimeException::eFormat, CTimeException::eInvalid, CCoreException::GetErrCode(), and CException::GetErrCodeString().
void CDeadline::GetExpirationTime | ( | time_t * | sec, |
unsigned int * | nanosec | ||
) | const |
Get the number of seconds and nanoseconds (since 1/1/1970).
Throw an exception if the deadline is infinite.
Definition at line 3842 of file ncbitime.cpp.
References CTimeout::eInfinite, CDeadline::IsInfinite(), CDeadline::m_Nanoseconds, CDeadline::m_Seconds, NCBI_THROW, and s_SpecialValueName().
Referenced by CConnTest::ExtraCheckOnFailure(), CRWLock::TryReadLock(), CRWLock::TryWriteLock(), SPSG_CV< deque< string > >::x_GetTP(), and CConditionVariable::x_WaitForSignal().
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 4167 of file ncbitime.cpp.
References s_FastLocalTime.
Referenced by BOOST_AUTO_TEST_CASE(), CGI2GRID_ComposeHtmlPage(), SThrottleStats::Check(), CGridCommandLineInterfaceApp::Cmd_RequestJob(), CBDB_Cache::EvaluateTimeLine(), CPerfLogger::GetElapsedTime(), CServer_ConnectionPool::GetPollAndTimerVec(), CCgi2RCgiApp::GetStatus(), SNetScheduleAPIImpl::Init(), CMessageDumperSender::InputMessage(), CSimpleRebalanceStrategy::NeedRebalance(), CGridCgiSampleApplication::OnEndProcessRequest(), CMessageDumperSender::OutputMessage(), CCgi2RCgiApp::PopulatePage(), CPerfLogger::Post(), CGridCommandLineInterfaceApp::PrintJobStatusNotification(), CBDB_Cache::Purge(), s_GetFastTime(), CPerfLogger::Start(), CCgi2RCgiApp::SubmitJob(), CPerfLogger::Suspend(), and CServer_ConnectionPool::x_UpdateExpiration().
|
inline |
Get format flags.
Definition at line 2242 of file ncbitime.hpp.
References CTimeFormat::m_Flags.
|
static |
Get the current time format.
The default format is: "M/D/Y h:m:s".
Definition at line 1277 of file ncbitime.cpp.
References kDefaultFormatTime, s_TlsFormatTime, and CTimeFormat::SetFormat().
Referenced by CTime::AsString(), CTime::CTime(), CTime::operator=(), and CTime::ValidateString().
|
static |
Get the current time span format.
If SetFormat() has not used before, that default formats are: "-S.n" - to output with AsString(); "-G" - to initialize from string.
Definition at line 2668 of file ncbitime.cpp.
References kDefaultFormatSpan, s_TlsFormatSpan, and CTimeFormat::SetFormat().
Referenced by CTimeSpan::AsString().
|
static |
Get the current stopwatch time format.
The default format is: "S.n".
Definition at line 4136 of file ncbitime.cpp.
References kDefaultFormatStopWatch, s_TlsFormatStopWatch, and CTimeFormat::SetFormat().
Referenced by CStopWatch::AsString().
|
inline |
Definition at line 1156 of file ncbitime.hpp.
References CTime::GetUniversalTime().
Referenced by s_FileTimeToCTime(), and CCgiResponse::SetHeaderValue().
CTime CFastLocalTime::GetLocalTime | ( | void | ) |
Get local time.
Definition at line 3988 of file ncbitime.cpp.
References CTime::AddSecond(), Daylight, eEmptyGuard, CTime::eIgnoreDaylight, CTime::GetCurrentTimeT(), CGuard< Resource, Lock, Unlock, ReportExceptions >::Guard(), CFastLocalTime::m_Daylight, CFastLocalTime::m_IsTuneup, CFastLocalTime::m_LastSysTime, CFastLocalTime::m_LastTuneupTime, CFastLocalTime::m_LocalTime, CFastLocalTime::m_SecAfterHour, CFastLocalTime::m_Timezone, NCBI_SCHED_YIELD, CGuard< Resource, Lock, Unlock, ReportExceptions >::Release(), CTime::SetNanoSecond(), TimeZone, and CFastLocalTime::x_Tuneup().
Referenced by SDiagMessage::x_OldWrite().
CTime CTime::GetLocalTime | ( | void | ) | const |
Get the time as local time.
Definition at line 2048 of file ncbitime.cpp.
References CTime::IsEmptyDate(), CTime::IsLocalTime(), NCBI_THROW, and t.
Referenced by CApplogUrl::ComposeUrl(), CTime::GetTimeDBI(), CTime::GetTimeDBU(), CTime::TimeZoneOffset(), and CTL_BCPInCmd::x_AssignParams().
int CFastLocalTime::GetLocalTimezone | ( | void | ) |
Get difference in seconds between UTC and current local time (daylight information included)
Definition at line 4043 of file ncbitime.cpp.
References Daylight, CTime::GetCurrentTimeT(), CFastLocalTime::m_Daylight, CFastLocalTime::m_IsTuneup, CFastLocalTime::m_LastTuneupTime, CFastLocalTime::m_SecAfterHour, CFastLocalTime::m_Timezone, TimeZone, and CFastLocalTime::x_Tuneup().
Referenced by CBDB_Cache::GetBlobAccess(), CBDB_Cache::GetReadStream(), CBDB_Cache::GetWriteStream(), CBDB_Cache::Read(), and CBDB_Cache::x_Store().
Get timeout in seconds and nanoseconds.
Definition at line 3561 of file ncbitime.cpp.
References CTimeout::IsFinite(), CTimeout::m_NanoSec, CTimeout::m_Sec, CTimeout::m_Type, NCBI_THROW, and s_SpecialValueName().
Referenced by CConnHolder::SetTimeout(), CRWLock::TryReadLock(), CSemaphore::TryWait(), and CRWLock::TryWriteLock().
|
inline |
Get number of nanoseconds.
Definition at line 2562 of file ncbitime.hpp.
References CTimeSpan::m_NanoSec.
Referenced by CTime::AddTimeSpan(), CTimeSpan::AsString(), CServer_ConnectionPool::GetPollAndTimerVec(), CTimeout::Set(), CRequestRateControl::Sleep(), CSrvDiagMsg::StopRequest(), CRPCClient_Base::x_Ask(), CTimeSpan::x_AsSmartString_Precision(), CTimeSpan::x_AsSmartString_Smart_Small(), CThreadPool_ServiceThread::x_Idle(), and CBlockingQueue< TRequest >::x_WaitForPredicate().
|
static |
Get predefined format.
fmt | String of symbols describing the time format. |
fmt_type | Specify type of the format string. |
Definition at line 389 of file ncbitime.cpp.
References CTimeFormat::CTimeFormat(), CTimeFormat::fFormat_Ncbi, and flags.
Referenced by CSeqDB::GetDBMetaData(), CFileLoadMRUList::LoadFromStrings(), CProjectService::LoadSettings(), CFileLoadManager::LoadSettings(), CGenBankLoadOptionPanel::LoadSettings(), CAsnSubCacheCreateApplication::Run(), CGenBankLoadOptionPanel::SaveMruAccessions(), CProjectService::SaveSettings(), CFileLoadManager::SaveSettings(), CFileLoadMRUList::SaveToStrings(), and IBISInteraction::ToAlignAnnot().
CNanoTimeout CDeadline::GetRemainingTime | ( | void | ) | const |
Get time left to the expiration.
Definition at line 3859 of file ncbitime.cpp.
References _ASSERT, CTimeout::eInfinite, int, CDeadline::IsInfinite(), kNanoSecondsPerSecond, CDeadline::m_Nanoseconds, CDeadline::m_Seconds, NCBI_THROW, s_SpecialValueName(), and CDeadline::x_SetNowPlus().
Referenced by CNetScheduleNotificationHandler::CmdAppendTimeoutGroupAndClientInfo(), SNetServerImpl::SConnectDeadline::IsExpired(), CDeadline::IsExpired(), SNetServiceImpl::IterateUntilExecOK(), CMainLoopThread::Main(), SRetryProcessing::operator()(), CNetScheduleNotificationHandler::RequestJobWatching(), SGridWorkerNodeImpl::Run(), CNetCacheWriter::TransmitImpl(), SServerNotifications::Wait(), CNetScheduleNotificationHandler::WaitForNotification(), CConditionVariable::x_WaitForSignal(), and CAsyncWriteCache::~CAsyncWriteCache().
|
inline |
Get sign of time span.
Definition at line 2529 of file ncbitime.hpp.
References eNegative, ePositive, eZero, CTimeSpan::m_NanoSec, and CTimeSpan::m_Sec.
Referenced by CTime::AddTimeSpan(), CTimeSpan::AsSmartString(), CTimeSpan::AsString(), CPeriodicTestJob::Run(), CTimeout::Set(), CTimeSpan::x_AsSmartString_Precision(), CTimeSpan::x_AsSmartString_Smart_Big(), CTimeSpan::x_AsSmartString_Smart_Small(), x_FindLatestSequence(), CThreadPool_ServiceThread::x_Idle(), CSyncQueue< Type, Container, Traits >::x_LockAndWait(), CNetStorageHandler::x_ProcessSetExpTime(), CBlockingQueue< TRequest >::x_WaitForPredicate(), and CThreadPool_Impl::x_WaitForPredicate().
Get format string.
Definition at line 2236 of file ncbitime.hpp.
References CTimeFormat::m_Str.
Referenced by CRR_Field< TTraits >::Get().
TDBTimeI CTime::GetTimeDBI | ( | void | ) | const |
Get time in database format time, TDBTimeI.
Definition at line 1467 of file ncbitime.cpp.
References CTime::CTime(), TDBTimeI::days, first(), CTime::GetLocalTime(), kNanoSecondsPerSecond, s_Date2Number(), t, and TDBTimeI::time.
Referenced by CDB_DateTime::Get300Secs(), and CDB_DateTime::GetDays().
TDBTimeU CTime::GetTimeDBU | ( | void | ) | const |
Get time in database format time, TDBTimeU.
Definition at line 1454 of file ncbitime.cpp.
References CTime::CTime(), TDBTimeU::days, first(), CTime::GetLocalTime(), s_Date2Number(), t, and TDBTimeU::time.
Referenced by CDB_SmallDateTime::GetDays(), and CDB_SmallDateTime::GetMinutes().
|
staticprotected |
Get current time mark.
Definition at line 4095 of file ncbitime.cpp.
References first().
Referenced by CStopWatch::Elapsed(), CStopWatch::Restart(), CStopWatch::Start(), and CStopWatch::Stop().
time_t CTime::GetTimeT | ( | void | ) | const |
Get time in time_t format.
The function return the number of seconds elapsed since midnight (00:00:00), January 1, 1970 UTC. Do not use this function if the year is before 1970.
Definition at line 1396 of file ncbitime.cpp.
Referenced by python::ConvertCVariant2PCObject(), CSampleTest::CSampleTest(), CTimeToTimeTms(), CNetBlastJobDescriptor::FromUserObject(), CSQLITE3_Cache::GetBlobAccess(), CDBConnectionFactory::CServiceInfo::GetOptions(), CBlobChangelogRecord::GetUpdatedTimePartition(), CWigGraph::Init(), CSubSource::IsCollectionDateAfterTime(), CFileLoadMRUList::LoadFromStrings(), CProjectService::LoadSettings(), CFileLoadManager::LoadSettings(), CGenBankLoadOptionPanel::LoadSettings(), CSQLITE3_Cache::Purge(), CFileObsolete::Remove(), CNcbiApplogApp::Run(), CAsnSubCacheCreateApplication::Run(), s_DumpHeader(), CWigGraph::Save(), SBlobInserter::SBlobInserter(), CDirEntry::SetTime(), CSplitCacheApp::SetupCache(), CConnTest::StatefulOkay(), CSQLITE3_Cache::StoreSynchronous(), CMacroFunction_Date::TheFunction(), CTime::TimeZoneName(), CTime::ToTime(), CTaskViewModel::x_AddTasks(), CTime::x_AdjustTimeImmediately(), CPrimeCacheApplication::x_CacheSeqEntry(), CDumpASNIndex::x_CreateBlob(), CAppTaskService::x_ExecuteNextTaskInQueue(), CPoolBalancer::x_GetServer(), CPoolBalancer::x_InitFromCounts(), CPrimeCacheApplication::x_Process_Fasta(), CPrimeCacheApplication::x_Process_Ids(), and CSQLITE3_Cache::x_SetTimestamp().
struct tm CTime::GetTimeTM | ( | void | ) | const |
Get time in "struct tm" format.
Definition at line 1396 of file ncbitime.cpp.
References CTime::IsEmptyDate(), NCBI_THROW, and s_GetTimeT().
|
inline |
Get time zone.
Definition at line 2424 of file ncbitime.hpp.
References CTime::m_Data, and CTime::TData::tz.
Referenced by CTime::DiffSecond(), CTime::GetTimeZoneFormat(), CTime::operator<(), CTime::operator==(), CTime::operator>(), CTime::SetTimeDBI(), CTime::SetTimeDBU(), CTime::ToTime(), CTime::x_AdjustTimeImmediately(), CTime::x_NeedAdjustTime(), and CTime::x_SetTime().
|
inline |
Definition at line 2430 of file ncbitime.hpp.
References CTime::GetTimeZone().
|
inline |
Get time zone precision.
Definition at line 2436 of file ncbitime.hpp.
References CTime::m_Data, and CTime::TData::tzprec.
Referenced by CTime::SetTimeDBI(), CTime::SetTimeDBU(), CTime::x_AdjustTime(), CTime::x_AdjustTimeImmediately(), and CTime::x_NeedAdjustTime().
CTime CTime::GetUniversalTime | ( | void | ) | const |
Get the time as universal (GMT/UTC) time.
Definition at line 2061 of file ncbitime.cpp.
References CTime::IsEmptyDate(), CTime::IsUniversalTime(), NCBI_THROW, and t.
Referenced by CTime::GetGmtTime(), and CTime::TimeZoneOffset().
|
inline |
Get hour.
Hours since midnight = 0..23. AsString() format symbol "h".
Definition at line 2274 of file ncbitime.hpp.
References CTime::TData::hour, and CTime::m_Data.
Referenced by python::ConvertCVariant2PCObject(), CTimeToTimeTms(), CTime::DiffSecond(), CTime::IsEmpty(), CTime::IsValid(), CTime::operator<(), CTime::operator==(), CTime::operator>(), s_TimeDump(), CCgiCookie::SetExpTime(), CDate_std::SetToTime(), CTime::TimeZoneOffset(), CTime::x_AddHour(), and CTime::x_AdjustTime().
|
inline |
Invert time span. Changes time span sign.
Definition at line 2637 of file ncbitime.hpp.
References CTimeSpan::m_NanoSec, and CTimeSpan::m_Sec.
Referenced by CTimeSpan::x_Init().
|
inline |
Definition at line 2723 of file ncbitime.hpp.
References CTimeout::eDefault, and CTimeout::m_Type.
Referenced by CDeadline::CDeadline(), CQueryImpl::Execute(), CQueryImpl::ExecuteSP(), g_CTimeoutToSTimeout(), CCgiContext::GetStreamStatus(), CInterProcessLock::Lock(), CUsageReportAPI::SetTimeout(), CConnHolder::SetTimeout(), CUsageReport::Wait(), and CHttpRequest::x_InitConnection().
bool CTime::IsDST | ( | void | ) | const |
Is DST (daylight savings time) in effect for this time?
Definition at line 1385 of file ncbitime.cpp.
References CTime::IsEmptyDate(), NCBI_THROW, and s_IsDST().
|
inline |
Check that format string is empty.
Definition at line 2248 of file ncbitime.hpp.
References CTimeFormat::m_Str.
Referenced by CStopWatch::AsString(), CTime::CTime(), CTimeSpan::CTimeSpan(), and CTime::ValidateString().
|
inline |
Is time object empty (date and time)?
Definition at line 2377 of file ncbitime.hpp.
References CTime::Day(), CTime::Hour(), CTime::Minute(), CTime::Month(), CTime::NanoSecond(), CTime::Second(), and CTime::Year().
Referenced by CTime::AsString(), CHttpCookie::AsString(), CApplogUrl::ComposeUrl(), CSeqDB::GetDate(), CHttpCookie::GetExpirationStr(), CELink_Request::GetQueryString(), CESearch_Request::GetQueryString(), CCgiSession::GetSessionCookie(), CVDBMgr::GetTimestamp(), CTimeFunctions::IsDefault(), CHttpCookie::IsExpired(), CTime::IsValid(), CHttpCookie::Parse(), CPerfLogger::Post(), CCgiResponse::SetHeaderValue(), CCgiResponse::SetTrackingCookie(), CPerfLogger::Start(), CTable2AsnContext::UpdateSubmitObject(), CReader::WaitBeforeNewConnection(), CReader::x_AllocConnection(), CAsnSubCacheCreateApplication::x_GetBioseqHandle(), SDiagMessage::x_InitData(), and CPoolBalancer::x_InitFromCounts().
|
inline |
Return TRUE is an object keep zero time span.
Definition at line 2579 of file ncbitime.hpp.
References CTimeSpan::m_NanoSec, and CTimeSpan::m_Sec.
Referenced by CRPCClient_Base::x_Ask(), CNSTDatabase::x_CalculateExpiration(), CRPCClient_Base::x_GetRetryDelay(), and CNetStorageHandler::x_ProcessSetExpTime().
|
inline |
Is date empty?
Definition at line 2385 of file ncbitime.hpp.
References CTime::Year().
Referenced by CTime::AddDay(), CTime::AddMinute(), CTime::AddMonth(), CTime::AddNanoSecond(), CTime::AddSecond(), CTimeToTimeTms(), CTime::DayOfWeek(), CTime::DaysInMonth(), CTime::GetLocalTime(), CTime::GetTimeTM(), CTime::GetUniversalTime(), CTime::IsDST(), CTime::Round(), s_Date2Number(), CTime::ToTime(), CTime::x_AddHour(), and CTime::YearWeekNumber().
|
inline |
Check if the deadline is expired.
Definition at line 1855 of file ncbitime.hpp.
References CDeadline::GetRemainingTime(), CDeadline::IsInfinite(), and CTimeout::IsZero().
Referenced by SNetServerImpl::ConnectAndExec(), CConnTest::ExtraCheckOnFailure(), CNetScheduleGetJobImpl< CMainLoopThread::CImpl >::GetJobImpl(), CTimer::IsExpired(), SSuspendResume::IsJobPullbackTimerExpired(), CDiffBase::IsTimeoutExpired(), CMainLoopThread::Main(), SRetryProcessing::operator()(), s_ConnectToNamedPipe(), CNetScheduleNotificationHandler::WaitForJobCompletion(), CNetScheduleNotificationHandler::WaitForJobEvent(), CUsageReport::x_ThreadHandler(), and CAsyncWriteCache::~CAsyncWriteCache().
|
inline |
Check if timeout holds a numeric value.
Definition at line 2735 of file ncbitime.hpp.
References CTimeout::eFinite, and CTimeout::m_Type.
Referenced by CDeadline::CDeadline(), CRemoteAppLauncher::ExecRemoteApp(), CTimeout::Get(), CTimeout::GetAsDouble(), CTimeout::GetAsMilliSeconds(), CTimeout::GetAsTimeSpan(), CTimeout::GetNano(), CCgiContext::GetStreamStatus(), CTimeout::IsZero(), SNetStorage_NetCacheBlob::SetExpiration(), SNetStorageObjectRPC::SetExpiration(), NDirectNetStorageImpl::CNetCache::SetExpiration(), and CUsageReportAPI::SetTimeout().
|
inline |
Definition at line 1108 of file ncbitime.hpp.
References CTime::IsUniversalTime().
Referenced by CCgiCookie::SetExpTime().
|
inline |
Definition at line 2729 of file ncbitime.hpp.
References CTimeout::eInfinite, and CTimeout::m_Type.
Referenced by CDeadline::CDeadline(), CDiff::Diff(), CDiffText::Diff(), g_CTimeoutToSTimeout(), CCgiContext::GetStreamStatus(), CInterProcessLock::Lock(), s_PeekStdin(), CRWLock::TryReadLock(), CSemaphore::TryWait(), CRWLock::TryWriteLock(), CThread::WaitForAllThreads(), and CDiff::x_DiffHalfMatch().
|
inline |
Check if the deadline is infinite.
Definition at line 1852 of file ncbitime.hpp.
References CDeadline::m_Infinite.
Referenced by CDeadline::GetExpirationTime(), CDeadline::GetRemainingTime(), CDeadline::IsExpired(), SNetServiceImpl::IterateUntilExecOK(), CDeadline::operator<(), CConditionVariable::x_WaitForSignal(), and SPSG_CV< deque< string > >::x_WaitUntil().
bool CTime::IsLeap | ( | void | ) | const |
Is time in a leap year?
Definition at line 2211 of file ncbitime.cpp.
References CTime::Year().
Referenced by CTime::DaysInMonth(), CTime::IsValid(), and CTime::YearDayNumber().
|
inline |
Is time local time?
Definition at line 2418 of file ncbitime.hpp.
References CTime::eLocal, CTime::m_Data, and CTime::TData::tz.
Referenced by CTime::GetLocalTime().
|
inline |
Check state of stopwatch.
Definition at line 2835 of file ncbitime.hpp.
References CStopWatch::eStart, and CStopWatch::m_State.
Referenced by CGlWidgetPane::CheckOverlayTimer(), CFileHandleDiagHandler::Post(), CFileDiagHandler::Post(), CSeqEntryPresenter::Process(), CFileHandleDiagHandler::Reopen(), CFileDiagHandler::Reopen(), CFileHandleDiagHandler::WriteMessage(), CFileDiagHandler::WriteMessage(), and CAnnot_Collector::x_SearchMapped().
|
inline |
Is time universal (GMT/UTC/Z)?
Definition at line 2421 of file ncbitime.hpp.
References CTime::eGmt, CTime::m_Data, and CTime::TData::tz.
Referenced by CTime::AsString(), CTimeToTimeTms(), CVDBMgr::GetTimestamp(), CTime::GetUniversalTime(), CTime::IsGmtTime(), and s_TimeDump().
bool CTime::IsValid | ( | void | ) | const |
Is time valid?
Definition at line 2013 of file ncbitime.cpp.
References _ASSERT, CTime::Day(), CTime::Hour(), CTime::IsEmpty(), CTime::IsLeap(), kNanoSecondsPerSecond, CTime::m_Data, CTime::Minute(), CTime::Month(), CTime::NanoSecond(), s_DaysInMonth, CTime::Second(), CTime::TData::tz, and CTime::Year().
Referenced by CTime::AsString(), CTime::CTime(), CTime::SetDay(), CTime::SetMonth(), CTime::SetTimeTM(), CTime::SetYear(), and CTime::x_Init().
bool CTimeout::IsZero | ( | void | ) | const |
Definition at line 3476 of file ncbitime.cpp.
References CTimeout::eDefault, CTimeout::IsFinite(), CTimeout::m_NanoSec, CTimeout::m_Sec, CTimeout::m_Type, NCBI_THROW, and s_SpecialValueName().
Referenced by CDeadline::CDeadline(), CCgiContext::GetStreamStatus(), SNetServerImpl::SConnectDeadline::IsExpired(), CDeadline::IsExpired(), CMainLoopThread::Main(), CTimeout::operator<=(), SGridWorkerNodeImpl::Run(), CUsageReportAPI::SetTimeout(), CRWLock::TryReadLock(), CRWLock::TryWriteLock(), and CJobCommitterThread::WaitForTimeout().
|
inline |
Get microseconds.
Microseconds after the second = 0..999999 AsString() format symbol "r".
Definition at line 2286 of file ncbitime.hpp.
References CTime::m_Data, and CTime::TData::nanosec.
|
inline |
Get milliseconds.
Milliseconds after the second = 0..999 AsString() format symbol "l".
Definition at line 2283 of file ncbitime.hpp.
References CTime::m_Data, and CTime::TData::nanosec.
Referenced by CTimeToTimeTms().
|
inline |
Get minute.
Minutes after the hour = 0..59 AsString() format symbol "m".
Definition at line 2277 of file ncbitime.hpp.
References CTime::m_Data, and CTime::TData::min.
Referenced by CTime::AddMinute(), python::ConvertCVariant2PCObject(), CTimeToTimeTms(), CTime::DiffSecond(), CTime::IsEmpty(), CTime::IsValid(), CTime::operator<(), CTime::operator==(), CTime::operator>(), s_TimeDump(), CCgiCookie::SetExpTime(), CDate_std::SetToTime(), CTime::TimeZoneOffset(), and CTime::x_AdjustTime().
|
inline |
Get month.
Month number = 1..12. AsString() format symbols "M", "B", "b".
Definition at line 2268 of file ncbitime.hpp.
References CTime::m_Data, and CTime::TData::month.
Referenced by CTime::AddMonth(), python::ConvertCVariant2PCObject(), CTimeToTimeTms(), CTime::DayOfWeek(), CTime::DaysInMonth(), CTime::IsEmpty(), CTime::IsValid(), CTime::MonthWeekNumber(), CTime::operator<(), CTime::operator==(), CTime::operator>(), s_Date2Number(), s_TimeDump(), CCgiCookie::SetExpTime(), CDate_std::SetToTime(), CUser_object::UpdateNcbiCleanup(), and CTime::x_AdjustTime().
Get numerical value of the month by name.
month | Full or abbreviated month name. |
Definition at line 1212 of file ncbitime.cpp.
References NStr::CompareNocase(), i, kMonthAbbr, kMonthFull, and NCBI_THROW.
Referenced by CSubSource::DateFromCollectionDate(), and CSubSource::FixDateFormat().
|
static |
Get name of the month by numerical value.
month | Full or abbreviated month name. |
format | Format for returned value (full or abbreviated). |
Definition at line 1230 of file ncbitime.cpp.
References CTime::eFull, NStr::IntToString(), kMonthAbbr, kMonthFull, and NCBI_THROW.
Referenced by CSubSource::FixDateFormat(), s_ChooseMonthAndDay(), and CMacroInterpreter::x_SetPubDateValidateArgs().
int CTime::MonthWeekNumber | ( | EDayOfWeek | first_day_of_week = eSunday | ) | const |
Get this date's week number in the month.
Definition at line 1177 of file ncbitime.cpp.
References CTime::Month(), CTime::Year(), and CTime::YearWeekNumber().
|
inline |
Get nano-seconds.
Nano-seconds after the second = 0..999999999 AsString() format symbol "S".
Definition at line 2289 of file ncbitime.hpp.
References CTime::m_Data, and CTime::TData::nanosec.
Referenced by CTime::AddNanoSecond(), python::ConvertCVariant2PCObject(), CTime::DiffNanoSecond(), CTime::DiffTimeSpan(), CTime::IsEmpty(), CTime::IsValid(), CTime::operator<(), CTime::operator==(), CTime::operator>(), CRandom::Randomize(), s_TimeDump(), and CDirEntry::SetTime().
CTimeException::NCBI_EXCEPTION_DEFAULT | ( | CTimeException | , |
CCoreException | |||
) |
|
inline |
Return time format as string.
Note: This method added temporarily, and will be deleted soon.
Definition at line 2254 of file ncbitime.hpp.
|
inline |
Return time as string using the format returned by GetFormat().
Definition at line 2332 of file ncbitime.hpp.
|
inline |
Return span time as string using the format returned by GetFormat().
Definition at line 2593 of file ncbitime.hpp.
|
inline |
Return stopwatch time as string using the format returned by GetFormat().
Definition at line 2842 of file ncbitime.hpp.
Operator to test in-equality of timeouts.
Definition at line 2741 of file ncbitime.hpp.
References t.
Operator to test in-equality of time span.
Definition at line 2650 of file ncbitime.hpp.
References t.
Definition at line 2605 of file ncbitime.hpp.
References CTimeSpan::m_NanoSec, CTimeSpan::m_Sec, and t.
Definition at line 2310 of file ncbitime.hpp.
References tmp.
Definition at line 2172 of file ncbitime.hpp.
Definition at line 2596 of file ncbitime.hpp.
References CTimeSpan::m_NanoSec, CTimeSpan::m_Sec, t, and CTimeSpan::x_Normalize().
Definition at line 2304 of file ncbitime.hpp.
References CTime::AddTimeSpan().
Operator to subtract times.
Definition at line 2326 of file ncbitime.hpp.
References CTime::DiffTimeSpan(), and t.
Operator to subtract time span.
Definition at line 2621 of file ncbitime.hpp.
References CTimeSpan::m_NanoSec, CTimeSpan::m_Sec, and t.
|
inline |
Unary operator "-" (minus) to change time span sign.
Definition at line 2628 of file ncbitime.hpp.
References CTimeSpan::m_NanoSec, CTimeSpan::m_Sec, and t.
Operator to subtract time span.
Definition at line 2612 of file ncbitime.hpp.
References CTimeSpan::m_NanoSec, CTimeSpan::m_Sec, t, and CTimeSpan::x_Normalize().
Operator to subtract time span.
Definition at line 2307 of file ncbitime.hpp.
References CTime::AddTimeSpan().
Compare two CDeadline values.
Definition at line 3900 of file ncbitime.cpp.
References CTimeout::eInfinite, CDeadline::IsInfinite(), CDeadline::m_Nanoseconds, CDeadline::m_Seconds, NCBI_THROW, and s_SpecialValueName().
Operator to test if time is earlier.
Definition at line 2174 of file ncbitime.cpp.
References CTime::Day(), CTime::GetTimeZone(), CTime::Hour(), CTime::Minute(), CTime::Month(), CTime::NanoSecond(), CTime::Second(), t, tmp, and CTime::Year().
Operator to test if timeout is less.
Definition at line 3672 of file ncbitime.cpp.
References COMPARE_TIMEOUT_TYPES, CTimeout::eDefault, CTimeout::eFinite, CTimeout::eInfinite, CTimeout::m_NanoSec, CTimeout::m_Sec, CTimeout::m_Type, NCBI_THROW, s_SpecialValueName(), and t.
Operator to test if time span is less.
Definition at line 2666 of file ncbitime.hpp.
References CTimeSpan::m_NanoSec, CTimeSpan::m_Sec, and t.
|
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 2204 of file ncbitime.hpp.
References CStopWatch::AsString(), and sw.
Dumps the current CTime time to an output stream.
The time will be printed out using format returned by CTime::GetFormat().
Definition at line 2213 of file ncbitime.hpp.
References t.
Operator to test if time is earlier or equal.
Definition at line 2365 of file ncbitime.hpp.
References t.
Operator to test if timeout is less or equal.
Definition at line 3731 of file ncbitime.cpp.
References COMPARE_TIMEOUT_TYPES, CTimeout::eDefault, CTimeout::eFinite, CTimeout::eInfinite, CTimeout::IsZero(), CTimeout::m_NanoSec, CTimeout::m_Sec, CTimeout::m_Type, NCBI_THROW, s_SpecialValueName(), and t.
Operator to test if time span is less or equal.
Definition at line 2681 of file ncbitime.hpp.
References t.
CTimeFormat & CTimeFormat::operator= | ( | const CTimeFormat & | fmt | ) |
Assignment operator.
Definition at line 378 of file ncbitime.cpp.
References CTimeFormat::m_Flags, and CTimeFormat::m_Str.
Assignment operator.
Definition at line 2585 of file ncbitime.hpp.
References CTimeSpan::m_NanoSec, CTimeSpan::m_Sec, and t.
Assignment operator from string.
If current format contains 'Z', then objects timezone will be set to:
Definition at line 2336 of file ncbitime.hpp.
References CTime::GetFormat(), str(), and CTime::x_Init().
Assignment operator.
Definition at line 2465 of file ncbitime.cpp.
References kDefaultFormatSpanIn, s_TlsFormatSpan, str(), and CTimeSpan::x_Init().
Operator to test equality of time.
Definition at line 2120 of file ncbitime.cpp.
References CTime::Day(), CTime::GetTimeZone(), CTime::Hour(), CTime::Minute(), CTime::Month(), CTime::NanoSecond(), CTime::Second(), t, tmp, and CTime::Year().
Operator to test equality of timeouts.
Definition at line 3654 of file ncbitime.cpp.
References COMPARE_TIMEOUT_TYPES, CTimeout::eDefault, CTimeout::eFinite, CTimeout::eInfinite, CTimeout::m_NanoSec, CTimeout::m_Sec, CTimeout::m_Type, NCBI_THROW, s_SpecialValueName(), and t.
Operator to test equality of time span.
Definition at line 2644 of file ncbitime.hpp.
References CTimeSpan::m_NanoSec, CTimeSpan::m_Sec, and t.
Operator to test if time is later.
Definition at line 2137 of file ncbitime.cpp.
References CTime::Day(), CTime::GetTimeZone(), CTime::Hour(), CTime::Minute(), CTime::Month(), CTime::NanoSecond(), CTime::Second(), t, tmp, and CTime::Year().
Operator to test if timeout is greater.
Definition at line 3690 of file ncbitime.cpp.
References COMPARE_TIMEOUT_TYPES, CTimeout::eDefault, CTimeout::eFinite, CTimeout::eInfinite, CTimeout::m_NanoSec, CTimeout::m_Sec, CTimeout::m_Type, NCBI_THROW, s_SpecialValueName(), and t.
Operator to test if time span is greater.
Definition at line 2656 of file ncbitime.hpp.
References CTimeSpan::m_NanoSec, CTimeSpan::m_Sec, and t.
Operator to test if time is later or equal.
Definition at line 2359 of file ncbitime.hpp.
References t.
Operator to test if timeout is greater or equal.
Definition at line 3708 of file ncbitime.cpp.
References COMPARE_TIMEOUT_TYPES, CTimeout::eDefault, CTimeout::eFinite, CTimeout::eInfinite, CTimeout::m_NanoSec, CTimeout::m_Sec, CTimeout::m_Type, NCBI_THROW, s_SpecialValueName(), and t.
Operator to test if time span is greater or equal.
Definition at line 2675 of file ncbitime.hpp.
References t.
|
inline |
Stop (if running) and reset the timer.
Definition at line 2807 of file ncbitime.hpp.
References CStopWatch::eStop, CStopWatch::m_Start, CStopWatch::m_State, and CStopWatch::m_Total.
Referenced by CGlWidgetPane::CheckOverlayTimer(), CFlatFileGenerator::Generate(), and CRequestContext::Reset().
|
inline |
Return time elapsed since first Start() or last Restart() call (in seconds).
Start new timer after that. Result is 0.0 if Start() or Restart() wasn't previously called.
Definition at line 2816 of file ncbitime.hpp.
References CStopWatch::eStart, CStopWatch::GetTimeMark(), CStopWatch::m_Start, CStopWatch::m_State, and CStopWatch::m_Total.
Referenced by BOOST_AUTO_TEST_CASE(), CPhyloTreePS::CalcForces(), CNetBLASTUIDataSource::Close(), CDBConnectionFactory::CStopWatchScope::CStopWatchScope(), CDataTool::GenerateCode(), CSeqEntryPresenter::Initialize(), CAlignSort::MergeSortedFiles(), CProjectTreePanel::OnDragOver(), CGlWidgetPane::OnEnterWindow(), CPhyTreeView::OnSomethingEdited(), CGlWidgetPane::OnTipRemoved(), CGenBankUIDataSource::Open(), CSeqEntryPresenter::Process(), CBam2GraphApp::ProcessFile(), CFileHandleDiagHandler::Reopen(), CFileDiagHandler::Reopen(), CRequestRateControl::Reset(), CTimeReporter::ResetAll(), CSeqDescrRetrievalJob::Run(), CDemoApp::Run(), CWorkerNodeIdleThread::Schedule(), CFileDiagHandler::SetLogFile(), CRequestContext::StartRequest(), CWorkerNodeIdleThread::Suspend(), CPhyloTreePS::Update(), CUpdateMultiSeq_Dlg::x_CreatePairwiseAlignments(), CRemoteBlast::x_GetSearchResultsHTTP(), and CNetScheduleHandler::x_ProcessBatchStart().
CTime & CTime::Round | ( | ERoundPrecision | precision = eRound_Day , |
EDaylight | adl = eDaylightDefault |
||
) |
Round time.
Round stored time to specified precision. All time components with precision less that specified will be zero-filled, all other components will be adjusted accordingly to rules for rounding numbers.
precision | Rounding precision. |
adl | Whether to adjust for daylight saving time. Default is to adjust for daylight saving time. This parameter is for eLocal time zone and where the time zone precision is not eNone. |
Definition at line 1923 of file ncbitime.cpp.
References CTime::AddDay(), CTime::AddHour(), CTime::AddMinute(), CTime::AddSecond(), CTime::eRound_Day, CTime::eRound_Hour, CTime::eRound_Microsecond, CTime::eRound_Millisecond, CTime::eRound_Minute, CTime::eRound_Second, CTime::TData::hour, CTime::IsEmptyDate(), kNanoSecondsPerSecond, CTime::m_Data, CTime::TData::min, CTime::TData::nanosec, NCBI_THROW, precision, CTime::TData::sec, and CTime::Truncate().
Referenced by CApplogUrl::ComposeUrl().
|
inline |
Get second.
Seconds after the minute = 0..59 AsString() format symbol "s".
Definition at line 2280 of file ncbitime.hpp.
References CTime::m_Data, and CTime::TData::sec.
Referenced by CTime::AddSecond(), python::ConvertCVariant2PCObject(), CTimeToTimeTms(), CTime::DiffSecond(), CTime::IsEmpty(), CTime::IsValid(), CTime::operator<(), CTime::operator==(), CTime::operator>(), CRandom::Randomize(), s_TimeDump(), CCgiCookie::SetExpTime(), CDate_std::SetToTime(), and CTime::TimeZoneOffset().
Set from CTimeSpan.
Definition at line 3630 of file ncbitime.cpp.
References CTimeSpan::AsString(), CTimeout::eFinite, eNegative, CTimeSpan::GetCompleteSeconds(), CTimeSpan::GetNanoSecondsAfterSecond(), CTimeSpan::GetSign(), int, kMax_UInt, CTimeout::m_NanoSec, CTimeout::m_Sec, CTimeout::m_Type, and NCBI_THROW.
void CTimeout::Set | ( | double | sec | ) |
Set timeout from number of seconds (fractional value).
Definition at line 3612 of file ncbitime.cpp.
References NStr::DoubleToString(), CTimeout::eFinite, int, kMax_UInt, kNanoSecondsPerSecond, CTimeout::m_NanoSec, CTimeout::m_Sec, CTimeout::m_Type, and NCBI_THROW.
void CTimeSpan::Set | ( | double | seconds | ) |
Set time span from number of seconds (fractional value).
Definition at line 2318 of file ncbitime.cpp.
References NStr::DoubleToString(), kNanoSecondsPerSecond, CTimeSpan::m_NanoSec, CTimeSpan::m_Sec, NCBI_THROW, and CTimeSpan::x_Normalize().
void CTimeout::Set | ( | EType | type | ) |
Set special value.
Definition at line 3577 of file ncbitime.cpp.
References CTimeout::eDefault, CTimeout::eFinite, CTimeout::eInfinite, CTimeout::eZero, NStr::IntToString(), CTimeout::m_Type, NCBI_THROW, and type.
Referenced by CCDDClientPool::CCDDClientPool(), CTimeout::CTimeout(), SInputValidator::GetDeadline(), CNcbiApplogApp::Redirect(), NDirectNetStorageImpl::CNetCache::SetExpiration(), CNSTDatabase::SetParameters(), CHttpRequest::SetTimeout(), CUsageReport::Wait(), CEutilsClient::x_InitParams(), and CNetStorageHandler::x_ProcessSetExpTime().
|
inline |
Set time span in seconds and nanoseconds.
Definition at line 2571 of file ncbitime.hpp.
References kNanoSecondsPerSecond, CTimeSpan::m_NanoSec, CTimeSpan::m_Sec, and CTimeSpan::x_Normalize().
Referenced by CTimeSpan::CTimeSpan(), and CRetryContext::SetDelay().
Set timeout in seconds and microseconds.
Definition at line 3595 of file ncbitime.cpp.
References CTimeout::eFinite, int, kMicroSecondsPerSecond, kNanoSecondsPerSecond, CTimeout::m_NanoSec, CTimeout::m_Sec, and CTimeout::m_Type.
|
inline |
Make the time current in the presently active time zone.
Definition at line 2301 of file ncbitime.hpp.
References CTime::x_SetTimeMTSafe().
Referenced by SThrottleStats::Adjust(), CHttpCookie::AsString(), CApplogUrl::ComposeUrl(), CTime::CTime(), CScheduler_ExecThread_Impl::Main(), CHttpCookie::Parse(), CNcbiApplogApp::Run(), CXcompareAnnotsApplication::Run(), CGBProject_ver2::SetDirtyFlag(), CCurrentTime::Update(), CTime::x_Init(), and CPoolBalancer::x_InitFromCounts().
void CTime::SetDay | ( | int | day | ) |
Set day.
Beware that this operation is inherently inconsistent. In case of number of days in the months, the day number can change, e.g.:
day | Day to set. Day of the month = 1..31. |
Definition at line 1074 of file ncbitime.cpp.
References CHECK_RANGE_DAY, CTime::DaysInMonth(), NStr::IntToString(), CTime::IsValid(), NCBI_THROW, and SET_DAY.
Set the current time format.
fmt | String of symbols describing the time format. |
flags | Flags specifying how to match a time string against format string. |
Definition at line 2230 of file ncbitime.hpp.
References flags.
Referenced by CEventViewModel::CEventViewModel(), CTaskViewModel::CTaskViewModel(), CTimeFormat::CTimeFormat(), CTime::GetFormat(), CTimeSpan::GetFormat(), CStopWatch::GetFormat(), and CMacroFunction_Date::TheFunction().
|
static |
Set the current time format.
The default format is: "M/D/Y h:m:s".
fmt | An object contains string of symbols describing the time format and its type. The following format letters have the special meaning:
|
following available on POSIX platforms only:
Format string can represent date/time partially, in this case current time, or default values, will be used to amplify time object, if possible. Current date/time cannot be used if format string contains "z" (time shift) format symbol. Also, it cannot be used if time format is ambiguous, like "Y/D". Note, that you still can use "Y/M", or even "Y", where month and day will be defined as 1; or "M/D", where year will be set as the current year.
Definition at line 1268 of file ncbitime.cpp.
References s_TlsFormatTime.
Referenced by CPepXML::ConvertFromOMSSA().
|
static |
Set the current stopwatch time format.
The default format is: "S.n".
fmt | Format specifier used to convert time span to string. If format is not defined, then GetFormat() will be used. Uses the same time format as CTimeSpan class. |
Definition at line 4127 of file ncbitime.cpp.
References s_TlsFormatStopWatch.
|
static |
Set the current time span format.
The default format is: "-S.n".
format | An object contains string of letters describing the time format and its type. The format letters have the following meanings:
|
Definition at line 2659 of file ncbitime.cpp.
References s_TlsFormatSpan.
Set the current time format.
fmt | String of symbols describing the time format. |
flags | Flags specifying how to match a time string against format string. |
Definition at line 352 of file ncbitime.cpp.
References f, CTimeFormat::fFormat_Ncbi, CTimeFormat::fFormat_Simple, flags, CTimeFormat::fMatch_Strict, CTimeFormat::fMatch_Weak, CTimeFormat::m_Flags, CTimeFormat::m_Str, and NCBI_THROW.
void CTime::SetHour | ( | int | hour | ) |
Set hour.
hour | Hours since midnight = 0..23. |
Definition at line 1092 of file ncbitime.cpp.
References CHECK_RANGE_HOUR, and SET_HOUR.
Referenced by python::CCursor::GetCVariant().
void CTime::SetMicroSecond | ( | long | microsecond | ) |
Set microseconds.
microsecond | Microseconds after the second = 0..999999. |
Definition at line 1120 of file ncbitime.cpp.
References CHECK_RANGE_NSEC, CTime::m_Data, and CTime::TData::nanosec.
Referenced by python::CCursor::GetCVariant(), and PopulateEntry().
void CTime::SetMilliSecond | ( | long | millisecond | ) |
Set milliseconds.
millisecond | Milliseconds after the second = 0..999. |
Definition at line 1113 of file ncbitime.cpp.
References CHECK_RANGE_NSEC, CTime::m_Data, and CTime::TData::nanosec.
Referenced by CBlobStatusHistoryRecord::ToString().
void CTime::SetMinute | ( | int | minute | ) |
Set minute.
minute | Minutes after the hour = 0..59. |
Definition at line 1099 of file ncbitime.cpp.
References CHECK_RANGE_MIN, and SET_MIN.
Referenced by python::CCursor::GetCVariant().
void CTime::SetMonth | ( | int | month | ) |
Set month.
Beware that this operation is inherently inconsistent. In case of different number of days in the months, the day number can change, e.g.:
month | Month number to set. Month number = 1..12. |
Definition at line 1057 of file ncbitime.cpp.
References CHECK_RANGE_MONTH, CTime::TData::day, CTime::DaysInMonth(), NStr::IntToString(), CTime::IsValid(), CTime::m_Data, NCBI_THROW, SET_DAY, and SET_MONTH.
Set timeout in seconds and nanoseconds.
Definition at line 3604 of file ncbitime.cpp.
References CTimeout::eFinite, int, kNanoSecondsPerSecond, CTimeout::m_NanoSec, CTimeout::m_Sec, and CTimeout::m_Type.
Referenced by CNanoTimeout::CNanoTimeout().
void CTime::SetNanoSecond | ( | long | nanosecond | ) |
Set nanoseconds.
nanosecond | Nanoseconds after the second = 0..999999999. |
Definition at line 1127 of file ncbitime.cpp.
References CHECK_RANGE_NSEC, CTime::m_Data, and CTime::TData::nanosec.
Referenced by CTarEntryInfo::GetCreationCTime(), CTarEntryInfo::GetLastAccessCTime(), CFastLocalTime::GetLocalTime(), CTarEntryInfo::GetModificationCTime(), CDirEntry::GetTime(), CTar::x_RestoreAttrs(), and CFastLocalTime::x_Tuneup().
void CTime::SetSecond | ( | int | second | ) |
Set second.
second | Seconds after the minute = 0..59. |
Definition at line 1106 of file ncbitime.cpp.
References CHECK_RANGE_SEC, and SET_SEC.
Referenced by python::CCursor::GetCVariant().
Set time using database format time, TDBTimeI.
Object's time format will always change to eLocal after call.
t | Time to set in time object in TDBTimeI format. This is always in local time format, and seconds, and nanoseconds will be truncated. |
Definition at line 1496 of file ncbitime.cpp.
References CTime::AddDay(), CTime::AddNanoSecond(), CTime::AddSecond(), CTime::eLocal, CTime::GetTimeZone(), CTime::GetTimeZonePrecision(), kNanoSecondsPerSecond, CTime::SetTimeZonePrecision(), t, and CTime::ToTime().
Referenced by CDB_DateTime::Value().
Set time using database format time, TDBTimeU.
Object's time format will always change to eLocal after call.
t | Time to set in time object in TDBTimeU format. This is always in local time format, and seconds, and nanoseconds will be truncated. |
Definition at line 1481 of file ncbitime.cpp.
References CTime::AddDay(), CTime::AddMinute(), CTime::eLocal, CTime::GetTimeZone(), CTime::GetTimeZonePrecision(), CTime::SetTimeZonePrecision(), t, and CTime::ToTime().
Referenced by CDB_SmallDateTime::Value().
Set time using time_t time value.
t | Time to set in time object. This is always in UTC time format, and nanoseconds will be truncated. |
Definition at line 2298 of file ncbitime.hpp.
References t, and CTime::x_SetTimeMTSafe().
Referenced by CScheduler_MT::CScheduler_MT(), CTime::CTime(), CDirEntry::GetTime(), CCgi2RCgiApp::PopulatePage(), CGridCommandLineInterfaceApp::PrintBlobMeta(), CNcbiApplogApp::Run(), s_GetBlobMeta(), CConnTest::StatefulOkay(), and CScheduler_MT::x_SchedQueueChanged().
Set time using "struct tm" time value.
t | Time to set in time object. This time always represents a local time in current time zone. Time object will be set to have eLocal time format, and nanoseconds will be truncated. Note that all significant fields in the time structure should be set and have correct vales, otherwise exception will be thrown. |
Definition at line 1424 of file ncbitime.cpp.
References CTime::TData::adjTimeDiff, CHECK_RANGE_DAY, CHECK_RANGE_HOUR, CHECK_RANGE_MIN, CHECK_RANGE_MONTH, CHECK_RANGE_SEC, CHECK_RANGE_YEAR, CTime::eLocal, CTime::IsValid(), CTime::m_Data, CTime::TData::nanosec, NCBI_THROW, s_TimeDump(), SET_DAY, SET_HOUR, SET_MIN, SET_MONTH, SET_SEC, SET_YEAR, t, and CTime::TData::tz.
Referenced by CTime::CTime().
|
inline |
Set time zone.
Definition at line 2442 of file ncbitime.hpp.
References CTime::m_Data, tmp, CTime::TData::tz, and val.
Referenced by CHttpCookie::Parse(), and CTime::SetTimeZoneFormat().
|
inline |
Definition at line 2450 of file ncbitime.hpp.
References CTime::SetTimeZone(), and val.
|
inline |
Set time zone precision.
Definition at line 2456 of file ncbitime.hpp.
References CTime::m_Data, tmp, CTime::TData::tzprec, and val.
Referenced by CFastLocalTime::CFastLocalTime(), CTime::SetTimeDBI(), CTime::SetTimeDBU(), and CTime::x_AdjustTimeImmediately().
void CTime::SetYear | ( | int | year | ) |
Set year.
Beware that this operation is inherently inconsistent. In case of different number of days in the months, the day number can change, e.g.:
year | Year to set. |
Definition at line 1040 of file ncbitime.cpp.
References CHECK_RANGE_YEAR, CTime::TData::day, CTime::DaysInMonth(), NStr::IntToString(), CTime::IsValid(), CTime::m_Data, NCBI_THROW, SET_DAY, and SET_YEAR.
|
inline |
Start the timer.
Do nothing if already started.
Definition at line 2764 of file ncbitime.hpp.
References CStopWatch::eStart, CStopWatch::GetTimeMark(), CStopWatch::m_Start, and CStopWatch::m_State.
Referenced by BlastdbCopyApplication::BlastdbCopyApplication(), BOOST_AUTO_TEST_CASE(), IPhyloTreeRender::BufferedRender(), CHitClustering::Build(), CPhyloTreePS::CalcForces(), CBamFileInfo::CBamFileInfo(), CBDB_SplitCursor< BDB_SplitStore, BDB_Vol >::CBDB_SplitCursor(), CBlastDBAliasApp::CBlastDBAliasApp(), CBlastDbBioseqSource::CBlastDbBioseqSource(), CBlastDbCheckApplication::CBlastDbCheckApplication(), CBlastDBCmdApp::CBlastDBCmdApp(), CBlastdbConvertApp::CBlastdbConvertApp(), CBlastFormatterApp::CBlastFormatterApp(), CBlastFormatterVdbApp::CBlastFormatterVdbApp(), CBlastMasterNode::CBlastMasterNode(), CBlastnApp::CBlastnApp(), CBlastpApp::CBlastpApp(), CBlastVdbCmdApp::CBlastVdbCmdApp(), CBlastxApp::CBlastxApp(), CConvert2BlastMaskApplication::CConvert2BlastMaskApplication(), CDeltaBlastApp::CDeltaBlastApp(), CMagicBlastApp::CMagicBlastApp(), CMakeBlastDBApp::CMakeBlastDBApp(), CMakeClusterDBApp::CMakeClusterDBApp(), CMakeProfileDBApp::CMakeProfileDBApp(), CMultiApplication::CMultiApplication(), ConvertToPairwise(), CPsiBlastApp::CPsiBlastApp(), CRPSBlastApp::CRPSBlastApp(), CRPSTBlastnApp::CRPSTBlastnApp(), CStopWatch::CStopWatch(), CTblastnApp::CTblastnApp(), CTblastxApp::CTblastxApp(), CVDBBlastnApp::CVDBBlastnApp(), CVDBTblastnApp::CVDBTblastnApp(), CExecute::Exec(), CChangePhyloTreeCommand::Execute(), CChangePhyloPropertyCmd::Execute(), CChangePhyloExpandCollapseCmd::Execute(), CQueryParsePanel::CQueryJob::Execute(), CMacroWorker::ExecuteMacros(), CFlatFileGenerator::Generate(), GetBlobReader(), CSNPDataLoader_Impl::GetChunkOnce(), CSNPFileInfo::InitializeDb(), CProcess::Kill(), CProcess::KillGroup(), IPhyloTreeRender::Layout(), CBamRefSeqInfo::LoadAlignChunk(), CSNPDataLoader_Impl::LoadBlob(), CBamRefSeqInfo::LoadMainSplit(), CBamRefSeqInfo::LoadPileupChunk(), CBamRefSeqInfo::LoadSeqChunk(), CIgBlastnApp::CIgWorker::Main(), CPhyTreeView::OnBioTreeChanged(), CSeqGraphicWidget::OnDataChanged(), CPhyTreeView::OnSomethingEdited(), CLBLASTUIDataSource::Open(), CNetBLASTUIDataSource::Open(), CBamUIDataSource::Open(), CGenBankUIDataSource::Open(), CSQLITE3_Cache::Open(), IPhyloTreeRender::PointToNode(), CTableFormatPanel::PreviewData(), CDeflineProcess::ProcessInitialize(), CSeqVectorProcess::ProcessInitialize(), CGlCgiImageApplication::ProcessRequest(), CTreeGraphicsModel::Render(), IPhyloTreeRender::Render(), CSeqDescrRetrievalJob::Run(), CAnnotMetaDataJob::Run(), CPubmedFetchApplication::Run(), CBlastInputDemoApplication::Run(), CAsnCacheTestApplication::Run(), CCacheIndexCopyApp::Run(), CConcatSeqEntriesApplication::Run(), CAsnCacheDumpSeqIdsApplication::Run(), CPrimeCacheApplication::Run(), CAsnSubCacheCreateApplication::Run(), CWalkAsnCacheApplication::Run(), CMytestApplication::Run(), CProjBulderApp::Run(), CObjConvProfile::Run(), CConvImageApp::Run(), CSubImageApp::Run(), CDbapiTestSpeedApp::RunSample(), s_GetDBTree(), CAlignSort::SAlignExtractor::SAlignExtractor(), CGBenchService::SendAppStart(), CPerfLogger::Start(), SW::SW(), CChangePhyloExpandCollapseCmd::Unexecute(), CPhyloTreePS::Update(), CAsnSubCacheCreateApplication::WriteBlobsInSubCache(), CBamRefSeqInfo::x_AddSeqChunk(), CPrimeCacheApplication::x_CacheSeqEntry(), CForceJob::x_Calculate(), CImportFeatTable::x_CreateCommand(), CAlnMultiDSBuilder::x_CreateSparseDataSource(), CComponentSearchJob::x_DoSearch(), CVcfSearchJob::x_DoSearch(), CCrossPanelIR::x_DrawCrossAlignment(), CNAUtils::x_GetAllNAIds(), CNAUtils::x_GetNAMetaData(), CRemoteBlast::x_GetSearchResultsHTTP(), CBlastVdbCmdApp::x_GetVDBBlastUtil(), CFast5colReader::x_IndexFile(), CAnnot_Collector::x_Initialize0(), CCSRARefSeqInfo::x_LoadRangesStat(), BlastdbCopyApplication::x_MakeDBwIDList(), CWorkspaceAutoSaver::x_OnSave(), CBlastVdbCmdApp::x_PrintBlastDatabaseInformation(), CBlastVdbCmdApp::x_PrintVDBPaths(), CPrimeCacheApplication::x_Process_Fasta(), CPrimeCacheApplication::x_Process_Ids(), CPhyloTreePane::x_Render(), CPhyloSlantedCladogram::x_RenderVbo(), IPhyloTreeRender::x_SetElementVisibility(), CAlignTabExportPage2::x_StartNAAlignNamesJob(), and CEditObjectFeaturePropagate::xGetEditCommandAllSequences().
|
inline |
Suspend the timer.
Next Start() call continue to count time accured before.
Definition at line 2792 of file ncbitime.hpp.
References CStopWatch::eStop, CStopWatch::GetTimeMark(), CStopWatch::m_Start, CStopWatch::m_State, and CStopWatch::m_Total.
Referenced by BOOST_AUTO_TEST_CASE(), CPhyloTreePS::CalcForces(), CBlastDbBioseqSource::CBlastDbBioseqSource(), CNetBLASTUIDataSource::Close(), CompressAssembly(), CSeqEntryPresenter::Finalize(), CNcbiTestApplication::InitTestFramework(), CBamRefSeqInfo::LoadAlignChunk(), CConnTestThread::Main(), CProjectTreePanel::OnBeginDrag(), CSeqGraphicWidget::OnDataChanged(), CProjectTreePanel::OnDragOver(), CProjectTreePanel::OnEndDrag(), CAppDialogs::OpenViewlDialog(), CSeqEntryPresenter::Process(), CAnnotMetaDataJob::Run(), CPubmedFetchApplication::Run(), CBlastInputDemoApplication::Run(), CGBenchService::SendAppFinish(), CWorkerNodeIdleThread::Suspend(), CPerfLogger::Suspend(), UncomressAndCreate(), CPhyloTreePS::Update(), CNAUtils::x_GetAllNAIds(), CNAUtils::x_GetNAMetaData(), CRemoteBlast::x_GetSearchResultsHTTP(), CBlastVdbCmdApp::x_GetVDBBlastUtil(), CFast5colReader::x_IndexFile(), BlastdbCopyApplication::x_MakeDBwIDList(), CWorkspaceAutoSaver::x_OnSave(), CBlastVdbCmdApp::x_PrintBlastDatabaseInformation(), CBlastVdbCmdApp::x_PrintVDBPaths(), CAnnot_Collector::x_StopSearchLimits(), and CDBConnectionFactory::CStopWatchScope::~CStopWatchScope().
|
inline |
Get difference between local timezone for current time object and UTC in seconds.
Definition at line 2479 of file ncbitime.hpp.
References CTime::TimeZoneOffset().
string CTime::TimeZoneName | ( | void | ) |
Get current time zone name.
Definition at line 2248 of file ncbitime.cpp.
References CTime::GetTimeT(), kEmptyStr, t, and TZName.
TSeconds CTime::TimeZoneOffset | ( | void | ) | const |
Get difference between local timezone for current time object and UTC in seconds.
Definition at line 2218 of file ncbitime.cpp.
References CTime::DiffWholeDays(), CTime::GetLocalTime(), CTime::GetUniversalTime(), CTime::Hour(), CTime::Minute(), and CTime::Second().
Referenced by python::ConvertCVariant2PCObject(), CTime::TimeZoneDiff(), CTime::TimeZoneOffsetStr(), and CTime::x_AdjustTimeImmediately().
string CTime::TimeZoneOffsetStr | ( | void | ) |
Get time zone offset string in format [+/-]HHMM.
Definition at line 2231 of file ncbitime.cpp.
References int, s_AddZeroPadInt2(), str(), and CTime::TimeZoneOffset().
|
inline |
Definition at line 1166 of file ncbitime.hpp.
References CTime::ToUniversalTime().
|
inline |
Convert the time into local time.
Definition at line 2464 of file ncbitime.hpp.
References CTime::eLocal, and CTime::ToTime().
Referenced by CApplogUrl::ComposeUrl(), CwxLogDiagHandler::DoLogRecord(), GetNetBlastJobDescription(), SLazyInitData::GetTime(), CEventViewModel::GetValueAt(), NS_FormatPreciseTime(), NST_FormatPreciseTime(), operator<<(), PopulateEntry(), s_DumpHeader(), CGenBankLoadOptionPanel::SaveMruAccessions(), CProjectService::SaveSettings(), CFileLoadManager::SaveSettings(), CFileLoadMRUList::SaveToStrings(), sFormatTimePeriod(), CBlobStatusHistoryRecord::ToString(), CTime::x_AdjustTimeImmediately(), and CMessageSlotPopupWindow::x_CreateMessageSlotPanel().
Convert the time into specified time zone time.
Definition at line 2074 of file ncbitime.cpp.
References CTime::eLocal, CTime::GetTimeT(), CTime::GetTimeZone(), CTime::IsEmptyDate(), CTime::m_Data, NCBI_THROW, CGuard< Resource, Lock, Unlock, ReportExceptions >::Release(), SET_DAY, SET_HOUR, SET_MIN, SET_MONTH, SET_SEC, SET_YEAR, t, and CTime::TData::tz.
Referenced by CTime::SetTimeDBI(), CTime::SetTimeDBU(), CTime::ToLocalTime(), and CTime::ToUniversalTime().
|
inline |
Convert the time into universal (GMT/UTC) time.
Definition at line 2471 of file ncbitime.hpp.
References CTime::eUTC, and CTime::ToTime().
Referenced by CTime::DiffSecond(), CVDBMgr::GetTimestamp(), CBlobChangelogRecord::GetUpdatedTimePartition(), and CTime::ToGmtTime().
Definition at line 2194 of file ncbitime.hpp.
Referenced by s_GetItem(), CResultSet::x_CacheItems(), and CODBC_RowResult::x_LoadItem().
CTime & CTime::Truncate | ( | ERoundPrecision | precision = eRound_Day | ) |
Truncate time.
Truncate stored time to specified precision. All time components with precision less that specified will be zero-filled. By default method strips hours, minutes, seconds and nanoseconds.
precision | Truncating precision. |
Definition at line 1970 of file ncbitime.cpp.
References CTime::eRound_Day, CTime::eRound_Hour, CTime::eRound_Microsecond, CTime::eRound_Millisecond, CTime::eRound_Minute, CTime::eRound_Second, CTime::TData::hour, CTime::m_Data, CTime::TData::min, CTime::TData::nanosec, precision, and CTime::TData::sec.
Referenced by CTime::Round().
void CFastLocalTime::Tuneup | ( | void | ) |
Do unscheduled check.
Definition at line 3944 of file ncbitime.cpp.
References CTime::GetCurrentTimeT(), CFastLocalTime::m_IsTuneup, and CFastLocalTime::x_Tuneup().
void TuneupFastLocalTime | ( | void | ) |
Definition at line 4173 of file ncbitime.cpp.
References s_FastLocalTime.
|
inline |
Validate if string match time format.
str | String representation of time. |
fmt | Format that is used to check time string. Default value of kEmptyStr, implies the format, that was previously setup using SetFormat() method, or default one. |
Definition at line 1033 of file ncbitime.cpp.
References CTime::eErr_NoThrow, CTime::GetFormat(), CTimeFormat::IsEmpty(), str(), and t.
|
private |
Helper method to add hour with/without shift time.
Parameter "shift_time" access or denied use time shift in process adjust hours.
Definition at line 1820 of file ncbitime.cpp.
References CTime::AddDay(), CTime::CTime(), CTime::eAdjustDaylight, CTime::eIgnoreDaylight, CTime::Hour(), CTime::IsEmptyDate(), kEmptyStr, NCBI_THROW, s_Offset(), SET_HOUR, CTime::x_AdjustTime(), and CTime::x_NeedAdjustTime().
Referenced by CTime::AddHour(), and CTime::x_AdjustTimeImmediately().
|
private |
Helper method to adjust day number to correct value after day manipulations.
Definition at line 2331 of file ncbitime.cpp.
References CTime::Day(), CTime::DaysInMonth(), and SET_DAY.
Referenced by CTime::AddMonth().
Helper method to adjust the time to correct timezone (across the barrier of winter & summer times) using "from" as a reference point.
This does the adjustment only if the time object:
Definition at line 2340 of file ncbitime.cpp.
References CTime::Day(), CTime::eDay, CTime::eHour, CTime::eMinute, CTime::eMonth, CTime::GetTimeZonePrecision(), CTime::Hour(), CTime::Minute(), CTime::Month(), CTime::x_AdjustTimeImmediately(), and CTime::x_NeedAdjustTime().
Referenced by CTime::AddDay(), CTime::AddMinute(), CTime::AddMonth(), and CTime::x_AddHour().
Helper method to forcibly adjust timezone using "from" as a reference point.
Definition at line 2365 of file ncbitime.cpp.
References CTime::TData::adjTimeDiff, CTime::eAdjustDaylight, CTime::eLocal, CTime::GetTimeT(), CTime::GetTimeZone(), CTime::GetTimeZonePrecision(), CTime::m_Data, CGuard< Resource, Lock, Unlock, ReportExceptions >::Release(), CTime::SetTimeZonePrecision(), t, CTime::TimeZoneOffset(), tmp, CTime::ToLocalTime(), and CTime::x_AddHour().
Referenced by CTime::x_AdjustTime().
|
private |
Definition at line 3009 of file ncbitime.cpp.
References _ASSERT, CTimeSpan::CTimeSpan(), eDay, eHour, eMicrosecond, eMillisecond, eMinute, eMonth, eNanosecond, eNegative, ePrecision, eSecond, eYear, flags, CTimeSpan::fSS_Full, CTimeSpan::fSS_PrecisionMask, CTimeSpan::fSS_Round, CTimeSpan::fSS_SkipZero, CTimeSpan::fSS_Smart, CTimeSpan::GetCompleteSeconds(), CTimeSpan::GetNanoSecondsAfterSecond(), CTimeSpan::GetSign(), i, kAverageSecondsPerMonth, kAverageSecondsPerYear, kNanoSecondsPerSecond, kTimeSpanUnitMultipliers, kUnitNames, NStr::LongToString(), SUnitName::name_full, SUnitName::name_short, precision, result, string, val, and rapidjson::value.
Referenced by CTimeSpan::AsSmartString().
|
private |
Helpers for AsSmartString()
Definition at line 2805 of file ncbitime.cpp.
References _ASSERT, CTimeSpan::CTimeSpan(), eDay, eHour, eMicrosecond, eMinute, eMonth, eNegative, eSecond, eYear, flags, CTimeSpan::fSS_Full, CTimeSpan::fSS_Round, CTimeSpan::fSS_Smart, CTimeSpan::GetCompleteSeconds(), CTimeSpan::GetSign(), kAverageSecondsPerMonth, kAverageSecondsPerYear, kNanoSecondsPerSecond, kTimeSpanUnitMultipliers, kUnitNames, NStr::LongToString(), SUnitName::name_full, SUnitName::name_short, result, string, and val.
Referenced by CTimeSpan::AsSmartString().
|
private |
Definition at line 2907 of file ncbitime.cpp.
References _ASSERT, CTimeSpan::CTimeSpan(), eMicrosecond, eMillisecond, eNanosecond, eNegative, eSecond, flags, CTimeSpan::fSS_Full, CTimeSpan::fSS_Round, CTimeSpan::fSS_Smart, CTimeSpan::GetNanoSecondsAfterSecond(), CTimeSpan::GetSign(), int, kUnitNames, len, NStr::LongToString(), n, SUnitName::name_full, SUnitName::name_short, result, string, v2, and CTimeSpan::x_Second().
Referenced by CTimeSpan::AsSmartString().
|
inlineprivate |
Get hour.
Hours since midnight = -23..23
Definition at line 2541 of file ncbitime.hpp.
References int, and CTimeSpan::m_Sec.
Referenced by CTimeSpan::AsString().
|
private |
Helper method to set time value from string "str" using format "fmt".
Definition at line 2480 of file ncbitime.cpp.
References CTimeSpan::Clear(), f, CTimeFormat::fFormat_Simple, CTimeFormat::fMatch_ShortFormat, CTimeFormat::fMatch_ShortTime, format, CTimeSpan::Invert(), isdigit(), kFormatEscapeSymbol, kFormatSymbolsSpan, len, CTimeSpan::m_NanoSec, CTimeSpan::m_Sec, n, NCBI_THROW, str(), NStr::StringToLong(), rapidjson::value, and CTimeSpan::x_Normalize().
Referenced by CTimeSpan::CTimeSpan(), and CTimeSpan::operator=().
|
private |
Helper method to set time value from string "str" using format "fmt".
Definition at line 507 of file ncbitime.cpp.
References _ASSERT, CTime::AddSecond(), CHECK_RANGE2_DAY, CHECK_RANGE2_HOUR12, CHECK_RANGE2_HOUR24, CHECK_RANGE2_MIN, CHECK_RANGE2_MONTH, CHECK_RANGE2_NSEC, CHECK_RANGE2_SEC, CHECK_RANGE2_YEAR, CTime::Clear(), CTime::TData::day, CTime::DayOfWeek(), CTime::eErr_Throw, CTime::eIgnoreDaylight, CTime::eLocal, CTime::eUTC, NStr::fAllowTrailingSymbols, CTimeFormat::fFormat_Simple, CTimeFormat::fMatch_IgnoreSpaces, CTimeFormat::fMatch_ShortFormat, CTimeFormat::fMatch_ShortTime, CTimeFormat::fMatch_Weak, STzFormatCheck::fmt(), format, CTime::TData::hour, i, NStr::IntToString(), isdigit(), isspace(), CTime::IsValid(), kFormatEscapeSymbol, kFormatSymbolsTime, kMonthAbbr, kMonthFull, kWeekdayAbbr, kWeekdayFull, len, CTime::m_Data, CTime::TData::month, n, CTime::TData::nanosec, SET_DAY, SET_HOUR, SET_MIN, SET_MONTH, SET_SEC, SET_YEAR, CTime::SetCurrent(), SKIP_SPACES, str(), STzFormatCheck::str(), NStr::StringToLong(), NStr::strncasecmp(), CTime::TData::tz, rapidjson::value, X_INIT_ERROR, and CTime::TData::year.
Referenced by CTime::CTime(), and CTime::operator=().
|
inlineprivate |
Get minute.
Minutes after the hour = -59..59
Definition at line 2544 of file ncbitime.hpp.
References int, and CTimeSpan::m_Sec.
Referenced by CTimeSpan::AsString().
|
inlineprivate |
Helper method to check if there is a need adjust time in timezone.
Definition at line 2485 of file ncbitime.hpp.
References CTime::eLocal, CTime::eNone, CTime::GetTimeZone(), and CTime::GetTimeZonePrecision().
Referenced by CTime::AddDay(), CTime::AddMinute(), CTime::AddMonth(), CTime::x_AddHour(), and CTime::x_AdjustTime().
|
private |
Helper method to normalize stored time value.
Definition at line 2644 of file ncbitime.cpp.
References kNanoSecondsPerSecond, CTimeSpan::m_NanoSec, and CTimeSpan::m_Sec.
Referenced by CTimeSpan::AssignFromSmartString(), CTimeSpan::CTimeSpan(), CTimeSpan::operator+=(), CTimeSpan::operator-=(), CTimeSpan::Set(), and CTimeSpan::x_Init().
|
inlineprivate |
Get second.
Seconds after the minute = -59..59
Definition at line 2547 of file ncbitime.hpp.
References int, and CTimeSpan::m_Sec.
Referenced by CTimeSpan::AsString(), and CTimeSpan::x_AsSmartString_Smart_Small().
Definition at line 3797 of file ncbitime.cpp.
References int, kMicroSecondsPerSecond, kNanoSecondsPerSecond, CDeadline::m_Nanoseconds, CDeadline::m_Seconds, NCBI_CONST_UINT8, and NCBI_THROW.
Referenced by CDeadline::CDeadline(), and CDeadline::GetRemainingTime().
Helper method to set time from 'time_t' – If "t" not specified, then set to current time.
Definition at line 1710 of file ncbitime.cpp.
References CTime::TData::adjTimeDiff, CHECK_RANGE_NSEC, CTime::eLocal, CTime::GetCurrentTimeT(), CTime::GetTimeZone(), CTime::m_Data, CTime::TData::nanosec, NCBI_THROW, SET_DAY, SET_HOUR, SET_MIN, SET_MONTH, SET_SEC, SET_YEAR, t, and rapidjson::value.
Referenced by CTime::x_SetTimeMTSafe(), and CFastLocalTime::x_Tuneup().
Version of x_SetTime() with MT-safe locks.
Definition at line 1663 of file ncbitime.cpp.
References rapidjson::value, and CTime::x_SetTime().
Referenced by CTime::SetCurrent(), and CTime::SetTimeT().
|
private |
Internal version of Tuneup()
Definition at line 3957 of file ncbitime.cpp.
References Daylight, int, CFastLocalTime::m_Daylight, CFastLocalTime::m_IsTuneup, CFastLocalTime::m_LastSysTime, CFastLocalTime::m_LastTuneupTime, CFastLocalTime::m_LocalTime, CFastLocalTime::m_Timezone, CFastLocalTime::m_TunedTime, NULL, CGuard< Resource, Lock, Unlock, ReportExceptions >::Release(), CTime::SetNanoSecond(), SwapPointers(), TimeZone, and CTime::x_SetTime().
Referenced by CFastLocalTime::GetLocalTime(), CFastLocalTime::GetLocalTimezone(), and CFastLocalTime::Tuneup().
|
inline |
Get year.
Year = 1900 .. AsString() format symbols "Y", "y".
Definition at line 2265 of file ncbitime.hpp.
References CTime::m_Data, and CTime::TData::year.
Referenced by CTime::AddMonth(), python::ConvertCVariant2PCObject(), CTimeToTimeTms(), CTime::DayOfWeek(), get_full_date(), CTime::IsEmpty(), CTime::IsEmptyDate(), CTime::IsLeap(), CTime::IsValid(), CTime::MonthWeekNumber(), CTime::operator<(), CTime::operator==(), CTime::operator>(), s_Date2Number(), s_TimeDump(), CCgiCookie::SetExpTime(), CDate_std::SetToTime(), CUser_object::UpdateNcbiCleanup(), and CTime::YearDayNumber().
int CTime::YearDayNumber | ( | void | ) | const |
Get year's day number.
Year day number = 1..366
Definition at line 1134 of file ncbitime.cpp.
References _ASSERT, CTime::CTime(), first(), int, CTime::IsLeap(), s_Date2Number(), and CTime::Year().
Referenced by CTime::YearWeekNumber().
int CTime::YearWeekNumber | ( | EDayOfWeek | first_day_of_week = eSunday | ) | const |
Get this date's week number within the year.
Calculate the week number in a year of a given date. The week can start on any day accordingly given parameter. First week always start with 1st January.
week_start | What day of week is first. Default is to use Sunday as first day of week. For Monday-based weeks use eMonday as parameter value. |
Definition at line 1143 of file ncbitime.cpp.
References CTime::DayOfWeek(), CTime::eSaturday, NStr::IntToString(), CTime::IsEmptyDate(), NCBI_THROW, and CTime::YearDayNumber().
Referenced by CTime::MonthWeekNumber().
|
inline |
Destructor.
Definition at line 1722 of file ncbitime.hpp.
unsigned CTime::TData::__pad0__ |
Definition at line 1260 of file ncbitime.hpp.
Int4 CTime::TData::adjTimeDiff |
Definition at line 1256 of file ncbitime.hpp.
Referenced by CTime::Clear(), CTime::CTime(), CTime::SetTimeTM(), CTime::x_AdjustTimeImmediately(), and CTime::x_SetTime().
unsigned char CTime::TData::day |
Definition at line 1250 of file ncbitime.hpp.
Referenced by CTime::Clear(), CTime::CTime(), CTime::Day(), CTime::SetMonth(), CTime::SetYear(), and CTime::x_Init().
Uint2 TDBTimeU::days |
Days from 1/1/1900.
Definition at line 109 of file ncbitime.hpp.
Referenced by CDB_SmallDateTime::Assign(), CDB_SmallDateTime::CDB_SmallDateTime(), CDB_SmallDateTime::GetDays(), CTime::GetTimeDBU(), and CDB_SmallDateTime::operator=().
Int4 TDBTimeI::days |
days from 1/1/1900
Definition at line 115 of file ncbitime.hpp.
Referenced by CDB_DateTime::Assign(), CDB_DateTime::CDB_DateTime(), CDB_DateTime::GetDays(), CTime::GetTimeDBI(), CDB_DateTime::operator=(), and CTL_BCPInCmd::x_AssignParams().
unsigned char CTime::TData::hour |
Definition at line 1251 of file ncbitime.hpp.
Referenced by CTime::Clear(), CTime::Hour(), CTime::Round(), CTime::Truncate(), and CTime::x_Init().
const double kAverageDaysPerYear = 365.2425 |
The average length of the year in the Gregorian (modern) calendar (in days)
Definition at line 99 of file ncbitime.hpp.
const TSeconds kAverageSecondsPerMonth = kAverageSecondsPerYear/12 |
Definition at line 102 of file ncbitime.hpp.
Referenced by CTimeSpan::x_AsSmartString_Precision(), and CTimeSpan::x_AsSmartString_Smart_Big().
The average length of the year in the Gregorian (modern) calendar (in seconds)
Definition at line 101 of file ncbitime.hpp.
Referenced by CTimeSpan::x_AsSmartString_Precision(), and CTimeSpan::x_AsSmartString_Smart_Big().
const long kMicroSecondsPerSecond = 1000000 |
Number of microseconds in one second.
Interval for it is from 0 to 999,999.
Definition at line 91 of file ncbitime.hpp.
Referenced by CDeadline::CDeadline(), CConnTest::ExtraCheckOnFailure(), CTimeout::Get(), CTime::GetCurrentTimeT(), CSystemInfo::GetUptime(), operator>(), CTL_CursorResultExpl::ReadItem(), s_SetTimeout(), CTimeout::Set(), CNcbiApplogApp::SetInfo(), CDirEntry::SetTime(), CRequestRateControl::Sleep(), SleepMicroSec(), SleepMilliSec(), SleepSec(), and CDeadline::x_SetNowPlus().
const long kMilliSecondsPerSecond = 1000 |
Number milliseconds in one second.
Interval for it is from 0 to 999.
Definition at line 96 of file ncbitime.hpp.
Referenced by CTimeout::GetAsMilliSeconds(), CSystemInfo::GetUptime(), SNetServiceImpl::Init(), CProcess::Kill(), CMainLoopThread::Main(), SRetryProcessing::operator()(), s_FileTimeToCTime(), s_GetTime(), s_Win_KillGroup(), SleepMicroSec(), and SleepMilliSec().
const long kNanoSecondsPerSecond = 1000000000 |
Number of nanoseconds in one second.
Interval for it is from 0 to 999,999,999.
Definition at line 86 of file ncbitime.hpp.
Referenced by CTime::AddNanoSecond(), CTimeSpan::AssignFromSmartString(), CDeadline::CDeadline(), CTimeSpan::CTimeSpan(), CTime::DiffNanoSecond(), CConnTest::ExtraCheckOnFailure(), CTimeout::Get(), CTimeSpan::GetAsDouble(), CTimeout::GetAsDouble(), CTimeout::GetAsMilliSeconds(), CTime::GetCurrentTimeT(), CTL_RowResult::GetItemInternal(), CDeadline::GetRemainingTime(), CTime::GetTimeDBI(), CSystemInfo::GetUptime(), CTime::IsValid(), CTime::Round(), s_FileTimeToCTime(), CTimeSpan::Set(), CTimeout::Set(), CNcbiApplogApp::SetInfo(), CTimeout::SetNano(), CDirEntry::SetTime(), CTime::SetTimeDBI(), SleepMicroSec(), CTimeSpan::x_AsSmartString_Precision(), CTimeSpan::x_AsSmartString_Smart_Big(), CTimeSpan::x_Normalize(), CDeadline::x_SetNowPlus(), and CBlockingQueue< TRequest >::x_WaitForPredicate().
|
private |
Packed members.
Definition at line 1263 of file ncbitime.hpp.
Referenced by CTime::AddNanoSecond(), CTime::Clear(), CTime::CTime(), CTime::Day(), CTime::GetTimeZone(), CTime::GetTimeZonePrecision(), CTime::Hour(), CTime::IsLocalTime(), CTime::IsUniversalTime(), CTime::IsValid(), CTime::MicroSecond(), CTime::MilliSecond(), CTime::Minute(), CTime::Month(), CTime::NanoSecond(), CTime::operator=(), CTime::Round(), CTime::Second(), CTime::SetMicroSecond(), CTime::SetMilliSecond(), CTime::SetMonth(), CTime::SetNanoSecond(), CTime::SetTimeTM(), CTime::SetTimeZone(), CTime::SetTimeZonePrecision(), CTime::SetYear(), CTime::ToTime(), CTime::Truncate(), CTime::x_AdjustTimeImmediately(), CTime::x_Init(), CTime::x_SetTime(), and CTime::Year().
|
private |
Cached system daylight information.
Definition at line 1925 of file ncbitime.hpp.
Referenced by CFastLocalTime::CFastLocalTime(), CFastLocalTime::GetLocalTime(), CFastLocalTime::GetLocalTimezone(), and CFastLocalTime::x_Tuneup().
|
private |
Format flags.
Definition at line 274 of file ncbitime.hpp.
Referenced by CTimeFormat::GetFlags(), CTimeFormat::operator=(), and CTimeFormat::SetFormat().
|
private |
Definition at line 1875 of file ncbitime.hpp.
Referenced by CDeadline::CDeadline(), and CDeadline::IsInfinite().
|
private |
(bool) Tuneup() in progress (MT)
Definition at line 1926 of file ncbitime.hpp.
Referenced by CFastLocalTime::GetLocalTime(), CFastLocalTime::GetLocalTimezone(), CFastLocalTime::Tuneup(), and CFastLocalTime::x_Tuneup().
|
private |
Last system time.
Definition at line 1923 of file ncbitime.hpp.
Referenced by CFastLocalTime::GetLocalTime(), and CFastLocalTime::x_Tuneup().
|
private |
Last Tuneup() time.
Definition at line 1922 of file ncbitime.hpp.
Referenced by CFastLocalTime::GetLocalTime(), CFastLocalTime::GetLocalTimezone(), and CFastLocalTime::x_Tuneup().
|
private |
Current local time.
Definition at line 1919 of file ncbitime.hpp.
Referenced by CFastLocalTime::CFastLocalTime(), CFastLocalTime::GetLocalTime(), and CFastLocalTime::x_Tuneup().
|
private |
Nanoseconds after the second.
Definition at line 1680 of file ncbitime.hpp.
Referenced by CTimeSpan::AssignFromSmartString(), CTimeSpan::Clear(), CTimeSpan::CTimeSpan(), CTimeSpan::GetAsDouble(), CTimeSpan::GetNanoSecondsAfterSecond(), CTimeSpan::GetSign(), CTimeSpan::Invert(), CTimeSpan::IsEmpty(), CTimeSpan::operator+(), CTimeSpan::operator+=(), CTimeSpan::operator-(), CTimeSpan::operator-=(), CTimeSpan::operator<(), CTimeSpan::operator=(), CTimeSpan::operator==(), CTimeSpan::operator>(), CTimeSpan::Set(), CTimeSpan::x_Init(), and CTimeSpan::x_Normalize().
|
private |
Nanoseconds part of the timeout.
Definition at line 1796 of file ncbitime.hpp.
Referenced by CTimeout::Get(), CTimeout::GetAsDouble(), CTimeout::GetAsMilliSeconds(), CTimeout::GetAsTimeSpan(), CTimeout::GetNano(), CTimeout::IsZero(), CTimeout::operator<(), CTimeout::operator<=(), CTimeout::operator==(), CTimeout::operator>(), CTimeout::operator>=(), CTimeout::Set(), and CTimeout::SetNano().
|
private |
Definition at line 1874 of file ncbitime.hpp.
Referenced by CDeadline::GetExpirationTime(), CDeadline::GetRemainingTime(), CDeadline::operator<(), and CDeadline::x_SetNowPlus().
|
private |
Seconds part of the time span.
Definition at line 1679 of file ncbitime.hpp.
Referenced by CTimeSpan::AssignFromSmartString(), CTimeSpan::Clear(), CTimeSpan::CTimeSpan(), CTimeSpan::GetAsDouble(), CTimeSpan::GetCompleteDays(), CTimeSpan::GetCompleteHours(), CTimeSpan::GetCompleteMinutes(), CTimeSpan::GetCompleteSeconds(), CTimeSpan::GetSign(), CTimeSpan::Invert(), CTimeSpan::IsEmpty(), CTimeSpan::operator+(), CTimeSpan::operator+=(), CTimeSpan::operator-(), CTimeSpan::operator-=(), CTimeSpan::operator<(), CTimeSpan::operator=(), CTimeSpan::operator==(), CTimeSpan::operator>(), CTimeSpan::Set(), CTimeSpan::x_Hour(), CTimeSpan::x_Init(), CTimeSpan::x_Minute(), CTimeSpan::x_Normalize(), and CTimeSpan::x_Second().
|
private |
Seconds part of the timeout.
Definition at line 1795 of file ncbitime.hpp.
Referenced by CTimeout::Get(), CTimeout::GetAsDouble(), CTimeout::GetAsMilliSeconds(), CTimeout::GetAsTimeSpan(), CTimeout::GetNano(), CTimeout::IsZero(), CTimeout::operator<(), CTimeout::operator<=(), CTimeout::operator==(), CTimeout::operator>(), CTimeout::operator>=(), CTimeout::Set(), and CTimeout::SetNano().
|
private |
Time interval in seconds after hour.
in which we should avoid to do Tuneup().
Definition at line 1917 of file ncbitime.hpp.
Referenced by CFastLocalTime::GetLocalTime(), and CFastLocalTime::GetLocalTimezone().
|
private |
Definition at line 1873 of file ncbitime.hpp.
Referenced by CDeadline::GetExpirationTime(), CDeadline::GetRemainingTime(), CDeadline::operator<(), and CDeadline::x_SetNowPlus().
|
private |
Start time value.
Definition at line 2058 of file ncbitime.hpp.
Referenced by CStopWatch::CStopWatch(), CStopWatch::Elapsed(), CStopWatch::Reset(), CStopWatch::Restart(), CStopWatch::Start(), and CStopWatch::Stop().
|
private |
Stopwatch state (started/stopped)
Definition at line 2060 of file ncbitime.hpp.
Referenced by CStopWatch::CStopWatch(), CStopWatch::Elapsed(), CStopWatch::IsRunning(), CStopWatch::Reset(), CStopWatch::Restart(), CStopWatch::Start(), and CStopWatch::Stop().
|
private |
String format.
Definition at line 273 of file ncbitime.hpp.
Referenced by CTimeFormat::GetString(), CTimeFormat::IsEmpty(), CTimeFormat::operator=(), and CTimeFormat::SetFormat().
|
private |
Cached timezone adjustment for local time.
Definition at line 1924 of file ncbitime.hpp.
Referenced by CFastLocalTime::CFastLocalTime(), CFastLocalTime::GetLocalTime(), CFastLocalTime::GetLocalTimezone(), and CFastLocalTime::x_Tuneup().
|
private |
Accumulated elapsed time.
Definition at line 2059 of file ncbitime.hpp.
Referenced by CStopWatch::CStopWatch(), CStopWatch::Elapsed(), CStopWatch::Reset(), CStopWatch::Restart(), and CStopWatch::Stop().
|
private |
Last tuned time (changed by Tuneup())
Definition at line 1920 of file ncbitime.hpp.
Referenced by CFastLocalTime::CFastLocalTime(), and CFastLocalTime::x_Tuneup().
|
private |
Type of timeout.
Definition at line 1794 of file ncbitime.hpp.
Referenced by CTimeout::Get(), CTimeout::GetAsDouble(), CTimeout::GetAsMilliSeconds(), CTimeout::GetAsTimeSpan(), CTimeout::GetNano(), CTimeout::IsDefault(), CTimeout::IsFinite(), CTimeout::IsInfinite(), CTimeout::IsZero(), CTimeout::operator<(), CTimeout::operator<=(), CTimeout::operator==(), CTimeout::operator>(), CTimeout::operator>=(), CTimeout::Set(), and CTimeout::SetNano().
unsigned char CTime::TData::min |
Definition at line 1252 of file ncbitime.hpp.
Referenced by CTime::Clear(), CTime::Minute(), CTime::Round(), and CTime::Truncate().
unsigned char CTime::TData::month |
Definition at line 1249 of file ncbitime.hpp.
Referenced by CTime::Clear(), CTime::CTime(), CTime::Month(), and CTime::x_Init().
Int4 CTime::TData::nanosec |
Definition at line 1261 of file ncbitime.hpp.
Referenced by CTime::AddNanoSecond(), CTime::Clear(), CTime::CTime(), CTime::MicroSecond(), CTime::MilliSecond(), CTime::NanoSecond(), CTime::Round(), CTime::SetMicroSecond(), CTime::SetMilliSecond(), CTime::SetNanoSecond(), CTime::SetTimeTM(), CTime::Truncate(), CTime::x_Init(), and CTime::x_SetTime().
unsigned char CTime::TData::sec |
Definition at line 1253 of file ncbitime.hpp.
Referenced by CTime::Clear(), CTime::Round(), CTime::Second(), and CTime::Truncate().
Uint2 TDBTimeU::time |
Minutes from the beginning of current day.
Definition at line 110 of file ncbitime.hpp.
Referenced by CDB_SmallDateTime::Assign(), CDB_SmallDateTime::CDB_SmallDateTime(), CDB_SmallDateTime::GetMinutes(), CTime::GetTimeDBU(), and CDB_SmallDateTime::operator=().
Int4 TDBTimeI::time |
x/300 seconds from the beginning of current day
Definition at line 116 of file ncbitime.hpp.
Referenced by CDB_DateTime::Assign(), CDB_DateTime::CDB_DateTime(), CDB_DateTime::Get300Secs(), CTime::GetTimeDBI(), CDB_DateTime::operator=(), and CTL_BCPInCmd::x_AssignParams().
ETimeZone CTime::TData::tz |
Definition at line 1258 of file ncbitime.hpp.
Referenced by CTime::CTime(), CTime::GetTimeZone(), CTime::IsLocalTime(), CTime::IsUniversalTime(), CTime::IsValid(), CTime::SetTimeTM(), CTime::SetTimeZone(), CTime::ToTime(), and CTime::x_Init().
ETimeZonePrecision CTime::TData::tzprec |
Definition at line 1259 of file ncbitime.hpp.
Referenced by CTime::CTime(), CTime::GetTimeZonePrecision(), and CTime::SetTimeZonePrecision().
unsigned int CTime::TData::year |
Definition at line 1248 of file ncbitime.hpp.
Referenced by CTime::Clear(), CTime::CTime(), CTime::x_Init(), and CTime::Year().
|
friend |
Definition at line 1266 of file ncbitime.hpp.