#include <ncbi_pch.hpp>
#include <corelib/ncbitime.hpp>
#include <corelib/ncbimtx.hpp>
#include <corelib/ncbithr.hpp>
#include <corelib/ncbi_safe_static.hpp>
#include <corelib/ncbi_limits.h>
#include <corelib/error_codes.hpp>
#include <stdlib.h>
Include dependency graph for ncbitime.cpp:

Go to the source code of this file.
Classes | |
| struct | SSmartStringItem |
Defines | |
| #define | TimeZone() timezone |
| #define | Daylight() daylight |
| #define | NCBI_USE_ERRCODE_X Corelib_Util |
| #define | CHECK_RANGE(value, what, min, max) |
| #define | CHECK_RANGE_YEAR(value) CHECK_RANGE(value, "year", 1583, kMax_Int) |
| #define | CHECK_RANGE_MONTH(value) CHECK_RANGE(value, "month", 1, 12) |
| #define | CHECK_RANGE_DAY(value) CHECK_RANGE(value, "day", 1, 31) |
| #define | CHECK_RANGE_HOUR(value) CHECK_RANGE(value, "hour", 0, 23) |
| #define | CHECK_RANGE_MIN(value) CHECK_RANGE(value, "minute", 0, 59) |
| #define | CHECK_RANGE_SEC(value) CHECK_RANGE(value, "second", 0, 61) |
| #define | CHECK_RANGE_NSEC(value) |
Functions | |
| DEFINE_STATIC_FAST_MUTEX (s_TimeMutex) | |
| DEFINE_STATIC_FAST_MUTEX (s_TimeAdjustMutex) | |
| DEFINE_STATIC_FAST_MUTEX (s_FastLocalTimeMutex) | |
| static void | s_TlsFormatCleanup (CTimeFormat *fmt, void *) |
| static unsigned | s_Date2Number (const CTime &date) |
| static CTime | s_Number2Date (unsigned num, const CTime &t) |
| static void | s_Offset (long *value, Int8 offset, long bound, int *major) |
| static void | s_AddZeroPadInt (string &str, long value, SIZE_TYPE len=2) |
| static void | s_GetTimeT (time_t &timer, long &ns) |
| string | s_SpecialValueName (CTimeout::EType type) |
| int | s_TimeoutCompareHash (const CTimeout &t) |
| CTime | GetFastLocalTime (void) |
| Quick and dirty getter of local time. | |
| void | TuneupFastLocalTime (void) |
Variables | |
| static CStaticTls< CTimeFormat > | s_TlsFormatTime |
| static CStaticTls< CTimeFormat > | s_TlsFormatSpan |
| static CStaticTls< CTimeFormat > | s_TlsFormatStopWatch |
| static CSafeStaticPtr< CFastLocalTime > | s_FastLocalTime |
| static int | s_DaysInMonth [12] |
| static const char * | kMonthAbbr [12] |
| static const char * | kMonthFull [12] |
| static const char * | kWeekdayAbbr [7] |
| static const char * | kWeekdayFull [7] |
| static const char * | kDefaultFormatTime = "M/D/Y h:m:s" |
| static const char * | kDefaultFormatSpan = "-S.n" |
| static const char * | kDefaultFormatStopWatch = "-S.n" |
| static const char * | kFormatSymbolsTime = "yYMbBDdhHmsSzZwWlrpP" |
| static const char * | kFormatSymbolsSpan = "-dhHmMsSnN" |
| const char | kFormatEscapeSymbol = '$' |
|
|
Value: if ( value < min || value > max ) { \ NCBI_THROW(CTimeException, eArgument, \ "CTime: " what " value '" + \ NStr::Int8ToString(value) + "' is out of range"); \ } Definition at line 205 of file ncbitime.cpp. |
|
|
Definition at line 214 of file ncbitime.cpp. Referenced by CTime::CTime(), CTime::SetDay(), and CTime::SetTimeTM(). |
|
|
Definition at line 215 of file ncbitime.cpp. Referenced by CTime::CTime(), CTime::SetHour(), and CTime::SetTimeTM(). |
|
|
Definition at line 216 of file ncbitime.cpp. Referenced by CTime::CTime(), CTime::SetMinute(), and CTime::SetTimeTM(). |
|
|
Definition at line 213 of file ncbitime.cpp. Referenced by CTime::CTime(), CTime::SetMonth(), and CTime::SetTimeTM(). |
|
|
Value: CHECK_RANGE(value, "nanosecond", 0, \ kNanoSecondsPerSecond - 1) Definition at line 218 of file ncbitime.cpp. Referenced by CTime::CTime(), CTime::SetMicroSecond(), CTime::SetMilliSecond(), CTime::SetNanoSecond(), and CTime::x_SetTime(). |
|
|
Definition at line 217 of file ncbitime.cpp. Referenced by CTime::CTime(), CTime::SetSecond(), and CTime::SetTimeTM(). |
|
|
Definition at line 212 of file ncbitime.cpp. Referenced by CTime::CTime(), CTime::SetTimeTM(), and CTime::SetYear(). |
|
|
Definition at line 52 of file ncbitime.cpp. Referenced by CFastLocalTime::CFastLocalTime(), CFastLocalTime::GetLocalTime(), CFastLocalTime::GetLocalTimezone(), CTime::GetTimeT(), and CFastLocalTime::x_Tuneup(). |
|
|
Definition at line 60 of file ncbitime.cpp. |
|
|
Definition at line 51 of file ncbitime.cpp. Referenced by CTime::AsString(), CFastLocalTime::CFastLocalTime(), CFastLocalTime::GetLocalTime(), CFastLocalTime::GetLocalTimezone(), CTime::GetTimeT(), and CFastLocalTime::x_Tuneup(). |
|
|
|
|
|
|
|
|
|
|
|
Quick and dirty getter of local time. Use global object of CFastLocalTime class to obtain time. See CFastLocalTime for details. Definition at line 2963 of file ncbitime.cpp. References s_FastLocalTime. Referenced by BOOST_AUTO_TEST_CASE(), CDiagContext::GetNextHitID(), and SDiagMessage::GetTime(). |
|
||||||||||||||||
|
Definition at line 958 of file ncbitime.cpp. References NStr::IntToString(). |
|
|
Definition at line 126 of file ncbitime.cpp. References CTime::IsEmptyDate(), and NCBI_THROW. Referenced by CTime::AddDay(), CTime::DiffWholeDays(), CTime::GetTimeDBI(), CTime::GetTimeDBU(), and CTime::YearDayNumber(). |
|
||||||||||||
|
Definition at line 1287 of file ncbitime.cpp. References kMicroSecondsPerSecond, kMilliSecondsPerSecond, kNanoSecondsPerSecond, and NCBI_THROW. Referenced by CFastLocalTime::GetLocalTime(), CFastLocalTime::GetLocalTimezone(), CFastLocalTime::Tuneup(), and CTime::x_SetTime(). |
|
||||||||||||
|
Definition at line 153 of file ncbitime.cpp. References CTime::GetTimeZone(), CTime::GetTimeZonePrecision(), CTime::Hour(), CTime::Minute(), CTime::NanoSecond(), and CTime::Second(). Referenced by CTime::AddDay(). |
|
||||||||||||||||||||
|
Definition at line 188 of file ncbitime.cpp. Referenced by CTime::AddMinute(), CTime::AddMonth(), CTime::AddNanoSecond(), CTime::AddSecond(), and CTime::x_AddHour(). |
|
|
Definition at line 2407 of file ncbitime.cpp. References CTimeout::eDefault, CTimeout::eInfinite, CTimeout::eZero, and kEmptyStr. Referenced by CTimeout::Get(), CTimeout::GetAsDouble(), CTimeout::GetAsMilliSeconds(), and CTimeout::GetAsTimeSpan(). |
|
|
Definition at line 2582 of file ncbitime.cpp. References CTimeout::IsDefault(), and CTimeout::IsInfinite(). Referenced by CTimeout::operator<(), CTimeout::operator<=(), CTimeout::operator==(), CTimeout::operator>(), and CTimeout::operator>=(). |
|
||||||||||||
|
Definition at line 76 of file ncbitime.cpp. Referenced by CStopWatch::SetFormat(), CTimeSpan::SetFormat(), and CTime::SetFormat(). |
|
|
Definition at line 2969 of file ncbitime.cpp. References s_FastLocalTime. |
|
|
Definition at line 113 of file ncbitime.cpp. Referenced by CTimeSpan::GetFormat(). |
|
|
Definition at line 114 of file ncbitime.cpp. Referenced by CStopWatch::GetFormat(). |
|
|
Definition at line 112 of file ncbitime.cpp. Referenced by CTime::GetFormat(). |
|
|
Definition at line 123 of file ncbitime.cpp. |
|
|
Definition at line 120 of file ncbitime.cpp. |
|
|
Definition at line 119 of file ncbitime.cpp. |
|
|
Initial value: {
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
}
Definition at line 93 of file ncbitime.cpp. Referenced by CTime::MonthNameToNum(), and CTime::MonthNumToName(). |
|
|
Initial value: {
"January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"
}
Definition at line 97 of file ncbitime.cpp. Referenced by CTime::MonthNameToNum(), and CTime::MonthNumToName(). |
|
|
Initial value: {
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
}
Definition at line 103 of file ncbitime.cpp. Referenced by CTime::DayOfWeekNameToNum(), and CTime::DayOfWeekNumToName(). |
|
|
Initial value: {
"Sunday", "Monday", "Tuesday", "Wednesday",
"Thursday", "Friday", "Saturday"
}
Definition at line 106 of file ncbitime.cpp. Referenced by CTime::DayOfWeekNameToNum(), and CTime::DayOfWeekNumToName(). |
|
|
Initial value: {
31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
}
Definition at line 88 of file ncbitime.cpp. Referenced by CTime::DaysInMonth(), and CTime::IsValid(). |
|
|
Definition at line 82 of file ncbitime.cpp. Referenced by GetFastLocalTime(), and TuneupFastLocalTime(). |
|
|
Definition at line 73 of file ncbitime.cpp. Referenced by CTimeSpan::GetFormat(), and CTimeSpan::SetFormat(). |
|
|
Definition at line 74 of file ncbitime.cpp. Referenced by CStopWatch::GetFormat(), and CStopWatch::SetFormat(). |
|
|
Definition at line 72 of file ncbitime.cpp. Referenced by CTime::GetFormat(), and CTime::SetFormat(). |
1.4.6
Modified on Mon Dec 07 16:21:45 2009 by modify_doxy.py rev. 173732