43 ONIXS_FENICSUST_BIMP_CONSTEXPR
46 return 86400000000000ll;
50 ONIXS_FENICSUST_BIMP_CONSTEXPR
53 return 3600000000000ll;
57 ONIXS_FENICSUST_BIMP_CONSTEXPR
64 ONIXS_FENICSUST_BIMP_CONSTEXPR
71 ONIXS_FENICSUST_BIMP_CONSTEXPR
78 ONIXS_FENICSUST_BIMP_CONSTEXPR
85 ONIXS_FENICSUST_BIMP_CONSTEXPR
92 ONIXS_FENICSUST_BIMP_CONSTEXPR
99 ONIXS_FENICSUST_BIMP_CONSTEXPR
106 ONIXS_FENICSUST_BIMP_CONSTEXPR
113 ONIXS_FENICSUST_BIMP_CONSTEXPR
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_);
367 ONIXS_FENICSUST_BIMP_API
372 ONIXS_FENICSUST_BIMP_API
377 ONIXS_FENICSUST_BIMP_API
422 throw std::invalid_argument(
423 "Unknown timespan format pattern specified. ");
437 toStr(str, timeSpan, format);
518 ONIXS_FENICSUST_BIMP_API
523 ONIXS_FENICSUST_BIMP_API
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,
688 ONIXS_FENICSUST_BIMP_API
692 Hour, Minute, Second,
696 ONIXS_FENICSUST_BIMP_API
698 void toDate(Ticks, Year&,
Month&, Day&);
706 static_cast<Timestamp::Ticks>(
833 ONIXS_FENICSUST_BIMP_API
842 ONIXS_FENICSUST_BIMP_API
851 ONIXS_FENICSUST_BIMP_API
860 ONIXS_FENICSUST_BIMP_API
869 ONIXS_FENICSUST_BIMP_API
887 toStr(str, timestamp, format);
893 ONIXS_FENICSUST_BIMP_API
904 const std::string& str)
908 ts, str.c_str(), str.size());
Hour hour() const
Hour component of given time point.
ONIXS_FENICSUST_BIMP_API void toStrAsYYYYMMDDHHMMSS(std::string &, Timestamp)
Serializes timestamp in YYYYMMDDHHMMSS format.
Timestamp(const Timestamp &other)
Initializes as copy of other instance.
Int32 Microseconds
Integral type for number of microseconds.
ONIXS_FENICSUST_BIMP_API void toStrAsYYYYMMDD(std::string &, Timestamp)
Serializes timestamp in YYYYMMDD format.
static ONIXS_FENICSUST_BIMP_CONSTEXPR Int32 nanosecondsPerMicrosecond()
Returns number of nanoseconds in single microsecond.
Int32 Minutes
Integral type for number of minutes.
Timestamp operator+(const Timestamp ×tamp, const TimeSpan &timeSpan)
Adds time interval to given time point.
ONIXS_FENICSUST_BIMP_API void toStrAsYYYYMMDDHHMMSSmsec(std::string &, Timestamp)
Serializes timestamp in YYYYMMDDHHMMSSmsec format.
OnixS::FenicsUST::MarketData::Bimp::Month::Enum Month
Type presenting month component.
bool operator==(const PriceLevel &l, const PriceLevel &r) ONIXS_FENICSUST_BIMP_NOTHROW
compare
static ONIXS_FENICSUST_BIMP_CONSTEXPR Int64 nanosecondsPerHour()
Returns number of nanoseconds in single hour.
Miscellaneous time characteristics.
UInt32 Nanosecond
Integral type presenting nanosecond component.
bool operator<=(const FixedPointDecimal< Mantissa, Exponent > &left, const FixedPointDecimal< Mantissa, Exponent > &right)
Compares two fixed-point decimals.
UInt32 Second
Integral type presenting second component.
Int32 Days
Integral type for number of days.
Nanosecond nanosecond() const
Nanosecond component of given time point.
UInt32 Year
Integral type presenting year component.
ONIXS_FENICSUST_BIMP_API void toStrAsHHMMSSmsec(std::string &, TimeSpan)
TimeSpan(Hours hours, Minutes minutes, Seconds seconds, Nanoseconds nanoseconds)
static ONIXS_FENICSUST_BIMP_CONSTEXPR Int32 minutesPerHour()
Returns number of minutes in single hour.
bool operator>=(const FixedPointDecimal< Mantissa, Exponent > &left, const FixedPointDecimal< Mantissa, Exponent > &right)
Compares two fixed-point decimals.
bool operator>(const FixedPointDecimal< Mantissa, Exponent > &left, const FixedPointDecimal< Mantissa, Exponent > &right)
Compares two fixed-point decimals.
Int32 Milliseconds
Integral type for number of milliseconds.
UInt32 Minute
Integral type presenting minute component.
Int32 Hours
Integral type for number of hours.
static ONIXS_FENICSUST_BIMP_CONSTEXPR Int64 nanosecondsPerDay()
Returns number of nanoseconds in single day.
TimeSpan(Ticks ticks=0) ONIXS_FENICSUST_BIMP_NOTHROW
Initializes timespan from given number of ticks.
Timestamp(Ticks ticks=0) ONIXS_FENICSUST_BIMP_NOTHROW
Initializes from number of ticks since epoch.
Milliseconds milliseconds() const
Int32 Seconds
Integral type for number of seconds.
TimeSpan time() const
Time part of timestamp.
static ONIXS_FENICSUST_BIMP_CONSTEXPR Int64 nanosecondsPerMinute()
Returns number of nanoseconds in single minute.
UInt32 Millisecond
Integral type presenting millisecond component.
Ticks sinceEpoch() const ONIXS_FENICSUST_BIMP_NOTHROW
Number of nanoseconds since the Epoch (01-01-1970).
Day day() const
Day component of given time point.
UInt64 Ticks
Integral type storing internal ticks.
static ONIXS_FENICSUST_BIMP_CONSTEXPR Int32 hoursPerDay()
Returns number of hours in single day.
static ONIXS_FENICSUST_BIMP_CONSTEXPR Int32 millisecondsPerSecond()
Returns number of milliseconds in single second.
ONIXS_FENICSUST_BIMP_API bool fromStr(Timestamp &, const char *, size_t)
De-serializes a timestamp from the given string.
Identifies months in year.
TimeSpan(Days days, Hours hours, Minutes minutes, Seconds seconds, Nanoseconds nanoseconds)
bool operator!=(const FixedPointDecimal< Mantissa, Exponent > &left, const FixedPointDecimal< Mantissa, Exponent > &right)
Compares two fixed-point decimals.
#define ONIXS_FENICSUST_BIMP_NOTHROW
Int32 Nanoseconds
Integral type for number of nanoseconds.
Second second() const
Second component of given time point.
Timestamp date() const
Timestamp without a time part.
Timestamp operator-(const Timestamp ×tamp, const TimeSpan &timeSpan)
Subtracts time interval from given time point.
Nanoseconds nanoseconds() const
Timestamp fromSeconds(UInt32 secondsSinceEpoch)
Create Timestamp from whole seconds since the Epoch.
ONIXS_FENICSUST_BIMP_API void toStrAsHHMMSS(std::string &, TimeSpan)
ONIXS_FENICSUST_BIMP_API void toStr(std::string &, EventCode::Enum)
Appends string presentation of object.
static ONIXS_FENICSUST_BIMP_CONSTEXPR Int32 nanosecondsPerMillisecond()
Returns number of nanoseconds in single millisecond.
static ONIXS_FENICSUST_BIMP_CONSTEXPR Int32 nanosecondsPerSecond()
Returns number of nanoseconds in single second.
static ONIXS_FENICSUST_BIMP_CONSTEXPR Int32 microsecondsPerSecond()
Returns number of microseconds in single second.
Minute minute() const
Minute component of given time point.
void swap(Timestamp &other)
Exchanges value with other instance.
Int64 Ticks
Integral type presenting internal ticks.
Year year() const
Year component of given time point.
UInt32 Microsecond
Integral type presenting microsecond component.
Month month() const
Month component of given time point.
void swap(TimeSpan &other) ONIXS_FENICSUST_BIMP_NOTHROW
Exchanges with given instance.
static ONIXS_FENICSUST_BIMP_CONSTEXPR Int32 secondsPerMinute()
Returns number of seconds in single minute.
bool operator<(const FixedPointDecimal< Mantissa, Exponent > &left, const FixedPointDecimal< Mantissa, Exponent > &right)
Compares two fixed-point decimals.
Represents time point without time-zone information.
ONIXS_FENICSUST_BIMP_API void toStrAsYYYYMMDDHHMMSSnsec(std::string &, Timestamp)
Serializes timestamp in YYYYMMDDHHMMSSnsec format.
Millisecond millisecond() const
Millisecond component of given time point.
UInt32 Hour
Integral type presenting hour component.
UInt32 Day
Integral type presenting day component.
Microseconds microseconds() const
Timestamp(Year year, Month month, Day day, Hour hour=0, Minute minute=0, Second second=0, Nanosecond nanosecond=0)
ONIXS_FENICSUST_BIMP_API void toStrAsSDHHMMSSnsec(std::string &, TimeSpan)
Microsecond microsecond() const
Microsecond component of given time point.