46 return 86400000000000ll;
53 return 3600000000000ll;
167 Nanoseconds nanoseconds)
169 static_cast<Ticks>(days) *
171 static_cast<Ticks>(hours) *
173 static_cast<Ticks>(minutes) *
175 static_cast<Ticks>(seconds) *
192 Nanoseconds nanoseconds)
194 static_cast<Ticks>(hours) *
196 static_cast<Ticks>(minutes) *
198 static_cast<Ticks>(seconds) *
231 static_cast<Minutes
>(
243 static_cast<Seconds
>(
255 static_cast<Milliseconds
> 267 static_cast<Microseconds
> 279 static_cast<Nanoseconds
> 299 ticks_ += other.ticks_;
308 ticks_ -= other.ticks_;
317 std::swap(ticks_, other.ticks_);
422 throw std::invalid_argument(
423 "Unknown timespan format pattern specified. ");
437 toStr(str, timeSpan, format);
547 Nanosecond nanosecond = 0)
551 hour, minute, second, nanosecond)
559 : sinceEpoch_(other.sinceEpoch_)
566 Year year;
Month month; Day day;
568 toDate(sinceEpoch_, year, month, day);
576 Year year;
Month month; Day day;
578 toDate(sinceEpoch_, year, month, day);
586 Year year;
Month month; Day day;
588 toDate(sinceEpoch_, year, month, day);
596 return static_cast<Hour
>(time().hours());
602 return static_cast<Minute
>(time().minutes());
608 return static_cast<Second
>(time().seconds());
614 return static_cast<Millisecond
>(time().milliseconds());
620 return static_cast<Microsecond
>(time().microseconds());
626 return static_cast<Nanosecond
>(time().nanoseconds());
660 sinceEpoch_ = other.sinceEpoch_;
680 unsigned long long presentation,
692 Hour, Minute, Second,
698 void toDate(Ticks, Year&,
Month&, Day&);
706 static_cast<Timestamp::Ticks>(
887 toStr(str, timestamp, format);
904 const std::string& str)
908 ts, str.c_str(), str.size());
Year year() const
Year component of given time point.
Int32 seconds() const
Seconds component of time interval.
bool operator<=(const Timestamp &left, const Timestamp &right)
Establishes order between two instances.
bool operator!=(const TimeSpan &left, const TimeSpan &right)
Compares with other instance for in-equality.
Timestamp(Year year, Month month, Day day, Hour hour=0, Minute minute=0, Second second=0, Nanosecond nanosecond=0)
Explicit time-stamp initialization.
void swap(Timestamp &other)
Exchanges value with other instance.
#define ONIXS_B3_UMDF_MD_NOTHROW
static Int32 hoursPerDay()
Returns number of hours in single day.
#define ONIXS_B3_UMDF_MD_CONSTEXPR
UInt32 Day
Integral type presenting day component.
Int32 Minutes
Integral type for number of minutes.
Microsecond microsecond() const
Microsecond component of given time point.
Represents time interval.
Hour hour() const
Hour component of given time point.
Microseconds microseconds() const
Microseconds component of time interval.
static Int64 nanosecondsPerMinute()
Returns number of nanoseconds in single minute.
UInt32 Year
Integral type presenting year component.
Represents time point without time-zone information.
Int32 Hours
Integral type for number of hours.
static Int64 nanosecondsPerHour()
Returns number of nanoseconds in single hour.
bool operator<(const TimeSpan &left, const TimeSpan &right)
Checks whether left time interval less than right one.
Nanoseconds nanoseconds() const
Nanoseconds component of time interval.
TimeSpan(Days days, Hours hours, Minutes minutes, Seconds seconds, Nanoseconds nanoseconds)
Initializes with given set of values.
bool operator>(const TimeSpan &left, const TimeSpan &right)
Checks whether left time interval greater than right one.
Int32 Days
Integral type for number of days.
ONIXS_B3_UMDF_MD_API void toStrAsHHMMSS(std::string &, TimeSpan)
static Int32 nanosecondsPerMicrosecond()
Returns number of nanoseconds in single microsecond.
TimeSpan(Ticks ticks=0)
Initializes timespan from given number of ticks.
ONIXS_B3_UMDF_MD_API void toStrAsYYYYMMDD(std::string &, Timestamp)
Serializes timestamp in YYYYMMDD format.
UInt64 Ticks
Integral type storing internal ticks.
UInt32 Nanosecond
Integral type presenting nanosecond component.
Timestamp fromSeconds(UInt32 secondsSinceEpoch)
Create Timestamp from whole seconds since the Epoch.
Day day() const
Day component of given time point.
Miscellaneous time characteristics.
Ticks sinceEpoch() const
Number of nanoseconds since the Epoch (01-01-1970).
OnixS::B3::MarketData::UMDF::Month::Enum Month
Type presenting month component.
Milliseconds milliseconds() const
Milliseconds component of time interval.
UInt32 Hour
Integral type presenting hour component.
Ticks ticks() const
Number of ticks in given time interval.
Nanosecond nanosecond() const
Nanosecond component of given time point.
ONIXS_B3_UMDF_MD_API bool fromStr(Timestamp &, const char *, size_t)
De-serializes a timestamp from the given string.
bool operator>=(const Timestamp &left, const Timestamp &right)
Establishes order between two instances.
ONIXS_B3_UMDF_MD_API void toStrAsYYYYMMDDHHMMSSmsec(std::string &, Timestamp)
Serializes timestamp in YYYYMMDDHHMMSSmsec format.
Month month() const
Month component of given time point.
UInt32 Microsecond
Integral type presenting microsecond component.
Minute minute() const
Minute component of given time point.
Int32 Microseconds
Integral type for number of microseconds.
ONIXS_B3_UMDF_MD_API void toStrAsYYYYMMDDHHMMSS(std::string &, Timestamp)
Serializes timestamp in YYYYMMDDHHMMSS format.
static Int32 nanosecondsPerSecond()
Returns number of nanoseconds in single second.
UInt32 Minute
Integral type presenting minute component.
Identifies months in year.
Millisecond millisecond() const
Millisecond component of given time point.
static Int32 secondsPerMinute()
Returns number of seconds in single minute.
Second second() const
Second component of given time point.
ONIXS_B3_UMDF_MD_API void toStrAsYYYYMMDDHHMMSSnsec(std::string &, Timestamp)
Serializes timestamp in YYYYMMDDHHMMSSnsec format.
static Int32 nanosecondsPerMillisecond()
Returns number of nanoseconds in single millisecond.
Timestamp date() const
Timestamp without a time part.
Int32 Nanoseconds
Integral type for number of nanoseconds.
static Int32 minutesPerHour()
Returns number of minutes in single hour.
TimeSpan(Hours hours, Minutes minutes, Seconds seconds, Nanoseconds nanoseconds)
Initializes with given set of values.
Timestamp operator-(const Timestamp ×tamp, const TimeSpan &timeSpan)
Subtracts time interval from given time point.
TimeSpan time() const
Time part of timestamp.
Timestamp(const Timestamp &other)
Initializes as copy of other instance.
Hours hours() const
Hours component of time interval.
ONIXS_B3_UMDF_MD_API void toStrAsHHMMSSmsec(std::string &, TimeSpan)
void swap(TimeSpan &other)
Exchanges with given instance.
Int32 Seconds
Integral type for number of seconds.
static Int64 nanosecondsPerDay()
Returns number of nanoseconds in single day.
Timestamp(Ticks ticks=0)
Initializes from number of ticks since epoch.
Int64 Ticks
Integral type presenting internal ticks.
bool operator==(const TimeSpan &left, const TimeSpan &right)
Compares with other instance for equality.
UInt32 Second
Integral type presenting second component.
static Int32 millisecondsPerSecond()
Returns number of milliseconds in single second.
Timestamp operator+(const Timestamp ×tamp, const TimeSpan &timeSpan)
Adds time interval to given time point.
Days days() const
Days component of time interval.
UInt32 Millisecond
Integral type presenting millisecond component.
Int32 minutes() const
Minutes component of time interval.
Int32 Milliseconds
Integral type for number of milliseconds.
static Int32 microsecondsPerSecond()
Returns number of microseconds in single second.
void toStr(std::string &str, TimeSpan timeSpan, TimeSpanFormat::Enum format=TimeSpanFormat::SDHHMMSSnsec)
Appends timespan formatted in specified pattern to given string.
ONIXS_B3_UMDF_MD_API void toStrAsSDHHMMSSnsec(std::string &, TimeSpan)