30 ONIXS_CONFLATEDUDP_DATA_PACKING_BEGIN(1)
38 return 86400000000000ll;
44 return 3600000000000ll;
151 Nanoseconds nanoseconds)
153 static_cast<Ticks>(days) *
155 static_cast<Ticks>(hours) *
157 static_cast<Ticks>(minutes) *
159 static_cast<Ticks>(seconds) *
176 Nanoseconds nanoseconds)
178 static_cast<Ticks>(hours) *
180 static_cast<Ticks>(minutes) *
182 static_cast<Ticks>(seconds) *
191 : ticks_(other.ticks_)
202 TimeTraits::nanosecondsPerDay());
212 TimeTraits::nanosecondsPerHour()) %
213 TimeTraits::hoursPerDay()
222 static_cast<Minutes
>(
224 TimeTraits::nanosecondsPerMinute()) %
225 TimeTraits::minutesPerHour()
234 static_cast<Seconds
>(
236 TimeTraits::nanosecondsPerSecond()) %
237 TimeTraits::secondsPerMinute()
246 static_cast<Milliseconds
> 248 TimeTraits::nanosecondsPerMillisecond()) %
249 TimeTraits::millisecondsPerSecond()
258 static_cast<Microseconds
> 260 TimeTraits::nanosecondsPerMicrosecond()) %
261 TimeTraits::microsecondsPerSecond()
270 static_cast<Nanoseconds
> 272 TimeTraits::nanosecondsPerSecond());
290 ticks_ += other.ticks_;
300 ticks_ -= other.ticks_;
310 ticks_ = other.ticks_;
319 std::swap(ticks_, other.ticks_);
369 ONIXS_CONFLATEDUDP_EXPORTED
374 ONIXS_CONFLATEDUDP_EXPORTED
379 ONIXS_CONFLATEDUDP_EXPORTED
406 TimeSpanFormat::SDHHMMSSnsec)
410 case TimeSpanFormat::HHMMSS:
414 case TimeSpanFormat::HHMMSSmsec:
418 case TimeSpanFormat::SDHHMMSSnsec:
424 throw std::invalid_argument(
425 "Unknown timespan format pattern specified. ");
436 TimeSpanFormat::SDHHMMSSnsec)
440 toStr(str, timeSpan, format);
526 Nanosecond nanosecond = 0)
530 hour, minute, second, nanosecond)
538 Year year;
Month month; Day day;
540 toDate(sinceEpoch_, year, month, day);
548 Year year;
Month month; Day day;
550 toDate(sinceEpoch_, year, month, day);
558 Year year;
Month month; Day day;
560 toDate(sinceEpoch_, year, month, day);
568 return static_cast<Hour
>(time().hours());
574 return static_cast<Minute
>(time().minutes());
580 return static_cast<Second
>(time().seconds());
586 return static_cast<Millisecond
>(time().milliseconds());
592 return static_cast<Microsecond
>(time().microseconds());
598 return static_cast<Nanosecond
>(time().nanoseconds());
608 TimeTraits::nanosecondsPerDay());
617 TimeTraits::nanosecondsPerDay());
646 Hour, Minute, Second,
655 Year&,
Month&, Day&);
781 ONIXS_CONFLATEDUDP_EXPORTED
790 ONIXS_CONFLATEDUDP_EXPORTED
799 ONIXS_CONFLATEDUDP_EXPORTED
808 ONIXS_CONFLATEDUDP_EXPORTED
842 TimestampFormat::YYYYMMDDHHMMSSnsec)
846 case TimestampFormat::YYYYMMDD:
850 case TimestampFormat::YYYYMMDDHHMMSS:
854 case TimestampFormat::YYYYMMDDHHMMSSmsec:
858 case TimestampFormat::YYYYMMDDHHMMSSnsec:
864 throw std::invalid_argument
866 "Unknown timestamp format pattern specified. " 878 TimestampFormat::YYYYMMDDHHMMSSnsec)
882 toStr(str, timestamp, format);
888 ONIXS_CONFLATEDUDP_EXPORTED
899 const std::string& str)
903 ts, str.c_str(), str.size());
907 ONIXS_CONFLATEDUDP_DATA_PACKING_END
bool operator<(const Timestamp &left, const Timestamp &right)
Establishes order between two instances.
TimeSpan(Ticks ticks=0)
Initializes timespan from given number of ticks.
TimeSpan(Days days, Hours hours, Minutes minutes, Seconds seconds, Nanoseconds nanoseconds)
static Int32 nanosecondsPerMicrosecond()
Returns number of nanoseconds in single microsecond.
ONIXS_CONFLATEDUDP_EXPORTED void toStrAsHHMMSSmsec(std::string &, TimeSpan)
TimeSpan time() const
Time part of timestamp.
ONIXS_CONFLATEDUDP_EXPORTED void toStrAsYYYYMMDD(std::string &, Timestamp)
Serializes timestamp in YYYYMMDD format.
static Int32 secondsPerMinute()
Returns number of seconds in single minute.
void swap(TimeSpan &other)
Exchanges with given instance.
ONIXS_CONFLATEDUDP_EXPORTED void toStrAsHHMMSS(std::string &, TimeSpan)
static Int64 nanosecondsPerMinute()
Returns number of nanoseconds in single minute.
Int32 Seconds
Integral type for number of seconds.
UInt32 Day
Integral type presenting day component.
UInt32 Year
Integral type presenting year component.
static Int32 microsecondsPerSecond()
Returns number of microseconds in single second.
TimeSpan operator-(const Timestamp &left, const Timestamp &right)
Calculates time interval between two time points.
TimeSpan(const TimeSpan &other)
Initializes instance as a copy of the other one.
UInt32 Nanosecond
Integral type presenting nanosecond component.
Millisecond millisecond() const
Millisecond component of given time point.
#define ONIXS_CONFLATEDUDP_LTWT_EXPORTED
Month month() const
Month component of given time point.
bool fromStr(Timestamp &ts, const std::string &str)
Microseconds microseconds() const
TimeSpan(Hours hours, Minutes minutes, Seconds seconds, Nanoseconds nanoseconds)
Represents time point without time-zone information.
Enum
Identifies months in year.
ONIXS_CONFLATEDUDP_EXPORTED void toStrAsYYYYMMDDHHMMSS(std::string &, Timestamp)
Serializes timestamp in YYYYMMDDHHMMSS format.
UInt32 Millisecond
Integral type presenting millisecond component.
UInt32 Hour
Integral type presenting hour component.
char Char
Character type alias.
Timestamp date() const
Timestamp without a time part.
Timestamp(Year year, Month month, Day day, Hour hour=0, Minute minute=0, Second second=0, Nanosecond nanosecond=0)
ONIXS_CONFLATEDUDP_EXPORTED void toStrAsSDHHMMSSnsec(std::string &, TimeSpan)
Nanosecond nanosecond() const
Nanosecond component of given time point.
Year year() const
Year component of given time point.
#define ONIXS_CONFLATEDUDP_LTWT_STRUCT
Hour hour() const
Hour component of given time point.
UInt32 Microsecond
Integral type presenting microsecond component.
UInt64 Ticks
Integral type storing internal ticks.
Ticks sinceEpoch() const
Number of nanoseconds since the Epoch (01-01-1970).
Timestamp operator+(const Timestamp ×tamp, const TimeSpan &timeSpan)
Adds time interval to given time point.
ONIXS_CONFLATEDUDP_EXPORTED Timestamp timestamp(const MultiContainer &, Tag)
Retrieves last update time field value.
Int32 Hours
Integral type for number of hours.
UInt32 Second
Integral type presenting second component.
Int32 Minutes
Integral type for number of minutes.
#define ONIXS_CONFLATEDUDP_NAMESPACE_END
bool operator!=(const Timestamp &left, const Timestamp &right)
Compares with instances for inequality.
static Int32 minutesPerHour()
Returns number of minutes in single hour.
static Int32 nanosecondsPerMillisecond()
Returns number of nanoseconds in single millisecond.
static Int32 nanosecondsPerSecond()
Returns number of nanoseconds in single second.
bool operator>(const Timestamp &left, const Timestamp &right)
Establishes order between two instances.
static Int64 nanosecondsPerHour()
Returns number of nanoseconds in single hour.
Int32 Nanoseconds
Integral type for number of nanoseconds.
Day day() const
Day component of given time point.
ONIXS_CONFLATEDUDP_EXPORTED void toStrAsYYYYMMDDHHMMSSmsec(std::string &, Timestamp)
Serializes timestamp in YYYYMMDDHHMMSSmsec format.
static Int32 hoursPerDay()
Returns number of hours in single day.
Identifies months in year.
Int32 Days
Integral type for number of days.
UInt32 Minute
Integral type presenting minute component.
std::string toStr(Timestamp timestamp, TimestampFormat::Enum format=TimestampFormat::YYYYMMDDHHMMSSnsec)
Serializes timestamp according to specified pattern.
ONIXS_CONFLATEDUDP_EXPORTED void toStrAsYYYYMMDDHHMMSSnsec(std::string &, Timestamp)
Serializes timestamp in YYYYMMDDHHMMSSnsec format.
Milliseconds milliseconds() const
Miscellaneous time characteristics.
Int64 Ticks
Integral type presenting internal ticks.
#define ONIXS_CONFLATEDUDP_LTWT_CLASS
static Int64 nanosecondsPerDay()
Returns number of nanoseconds in single day.
Int32 Microseconds
Integral type for number of microseconds.
bool operator==(const Timestamp &left, const Timestamp &right)
Compares with instances for equality.
Nanoseconds nanoseconds() const
static Int32 millisecondsPerSecond()
Returns number of milliseconds in single second.
Microsecond microsecond() const
Microsecond component of given time point.
#define ONIXS_CONFLATEDUDP_NAMESPACE_BEGIN
OnixS::CME::ConflatedUDP::Month::Enum Month
Type presenting month component.
Int32 Milliseconds
Integral type for number of milliseconds.
bool operator>=(const Timestamp &left, const Timestamp &right)
Establishes order between two instances.
bool operator<=(const Timestamp &left, const Timestamp &right)
Establishes order between two instances.
Timestamp(Ticks ticks=0)
Initializes from number of ticks since epoch.
Second second() const
Second component of given time point.
Minute minute() const
Minute component of given time point.
void swap(Timestamp &other)
Exchanges value with other instance.