Apache Ignite C++ Client
Loading...
Searching...
No Matches
ignite::ignite_timestamp Class Reference

A moment of time. More...

#include <ignite_timestamp.h>

Public Member Functions

constexpr ignite_timestamp () noexcept=default
constexpr ignite_timestamp (std::int64_t seconds, std::int32_t nanos)
constexpr std::int64_t get_epoch_second () const noexcept
constexpr std::int32_t get_nano () const noexcept
constexpr int compare (const ignite_timestamp &other) const noexcept

Detailed Description

A moment of time.

This is modeled after java.time.Instant.

Constructor & Destructor Documentation

◆ ignite_timestamp() [1/2]

ignite::ignite_timestamp::ignite_timestamp ( )
constexprdefaultnoexcept

Default constructor.

◆ ignite_timestamp() [2/2]

ignite::ignite_timestamp::ignite_timestamp ( std::int64_t seconds,
std::int32_t nanos )
inlineconstexpr

Constructor.

Parameters
secondsNumber of seconds since 00:00 hours, Jan 1, 1970 UTC.
nanosFractional second component in nanoseconds, from 0 to 999,999,999.

Member Function Documentation

◆ compare()

int ignite::ignite_timestamp::compare ( const ignite_timestamp & other) const
inlinenodiscardconstexprnoexcept

compare to another value.

Parameters
otherInstance to compare to.
Returns
Zero if equals, negative number if less, and positive if greater.

◆ get_epoch_second()

std::int64_t ignite::ignite_timestamp::get_epoch_second ( ) const
inlinenodiscardconstexprnoexcept

Gets the number of seconds since 00:00 hours, Jan 1, 1970 UTC.

◆ get_nano()

std::int32_t ignite::ignite_timestamp::get_nano ( ) const
inlinenodiscardconstexprnoexcept

Gets the number of nanoseconds from the start of the second.


The documentation for this class was generated from the following file: