Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
grpc_core::Timestamp Class Reference

#include <time.h>

Public Member Functions

gpr_timespec as_timespec (gpr_clock_type type) const
 
bool is_process_epoch () const
 
uint64_t milliseconds_after_process_epoch () const
 
constexpr bool operator!= (Timestamp other) const
 
Timestampoperator+= (Duration duration)
 
constexpr bool operator< (Timestamp other) const
 
constexpr bool operator<= (Timestamp other) const
 
constexpr bool operator== (Timestamp other) const
 
constexpr bool operator> (Timestamp other) const
 
constexpr bool operator>= (Timestamp other) const
 
constexpr Timestamp ()=default
 
std::string ToString () const
 

Static Public Member Functions

static Timestamp FromCycleCounterRoundDown (gpr_cycle_counter c)
 
static Timestamp FromCycleCounterRoundUp (gpr_cycle_counter c)
 
static constexpr Timestamp FromMillisecondsAfterProcessEpoch (int64_t millis)
 
static Timestamp FromTimespecRoundDown (gpr_timespec t)
 
static Timestamp FromTimespecRoundUp (gpr_timespec t)
 
static constexpr Timestamp InfFuture ()
 
static constexpr Timestamp InfPast ()
 
static constexpr Timestamp ProcessEpoch ()
 

Private Member Functions

constexpr Timestamp (int64_t millis)
 

Private Attributes

int64_t millis_ = 0
 

Detailed Description

Definition at line 62 of file src/core/lib/gprpp/time.h.

Constructor & Destructor Documentation

◆ Timestamp() [1/2]

constexpr grpc_core::Timestamp::Timestamp ( )
constexprdefault

◆ Timestamp() [2/2]

constexpr grpc_core::Timestamp::Timestamp ( int64_t  millis)
inlineexplicitconstexprprivate

Definition at line 116 of file src/core/lib/gprpp/time.h.

Member Function Documentation

◆ as_timespec()

gpr_timespec Timestamp::as_timespec ( gpr_clock_type  type) const

Definition at line 157 of file src/core/lib/gprpp/time.cc.

◆ FromCycleCounterRoundDown()

Timestamp Timestamp::FromCycleCounterRoundDown ( gpr_cycle_counter  c)
static

Definition at line 152 of file src/core/lib/gprpp/time.cc.

◆ FromCycleCounterRoundUp()

Timestamp Timestamp::FromCycleCounterRoundUp ( gpr_cycle_counter  c)
static

Definition at line 147 of file src/core/lib/gprpp/time.cc.

◆ FromMillisecondsAfterProcessEpoch()

static constexpr Timestamp grpc_core::Timestamp::FromMillisecondsAfterProcessEpoch ( int64_t  millis)
inlinestaticconstexpr

Definition at line 73 of file src/core/lib/gprpp/time.h.

◆ FromTimespecRoundDown()

Timestamp Timestamp::FromTimespecRoundDown ( gpr_timespec  t)
static

Definition at line 141 of file src/core/lib/gprpp/time.cc.

◆ FromTimespecRoundUp()

Timestamp Timestamp::FromTimespecRoundUp ( gpr_timespec  t)
static

Definition at line 136 of file src/core/lib/gprpp/time.cc.

◆ InfFuture()

static constexpr Timestamp grpc_core::Timestamp::InfFuture ( )
inlinestaticconstexpr

Definition at line 79 of file src/core/lib/gprpp/time.h.

◆ InfPast()

static constexpr Timestamp grpc_core::Timestamp::InfPast ( )
inlinestaticconstexpr

Definition at line 83 of file src/core/lib/gprpp/time.h.

◆ is_process_epoch()

bool grpc_core::Timestamp::is_process_epoch ( ) const
inline

Definition at line 107 of file src/core/lib/gprpp/time.h.

◆ milliseconds_after_process_epoch()

uint64_t grpc_core::Timestamp::milliseconds_after_process_epoch ( ) const
inline

Definition at line 109 of file src/core/lib/gprpp/time.h.

◆ operator!=()

constexpr bool grpc_core::Timestamp::operator!= ( Timestamp  other) const
inlineconstexpr

Definition at line 90 of file src/core/lib/gprpp/time.h.

◆ operator+=()

Timestamp & Timestamp::operator+= ( Duration  duration)
inline

Definition at line 290 of file src/core/lib/gprpp/time.h.

◆ operator<()

constexpr bool grpc_core::Timestamp::operator< ( Timestamp  other) const
inlineconstexpr

Definition at line 93 of file src/core/lib/gprpp/time.h.

◆ operator<=()

constexpr bool grpc_core::Timestamp::operator<= ( Timestamp  other) const
inlineconstexpr

Definition at line 96 of file src/core/lib/gprpp/time.h.

◆ operator==()

constexpr bool grpc_core::Timestamp::operator== ( Timestamp  other) const
inlineconstexpr

Definition at line 87 of file src/core/lib/gprpp/time.h.

◆ operator>()

constexpr bool grpc_core::Timestamp::operator> ( Timestamp  other) const
inlineconstexpr

Definition at line 99 of file src/core/lib/gprpp/time.h.

◆ operator>=()

constexpr bool grpc_core::Timestamp::operator>= ( Timestamp  other) const
inlineconstexpr

Definition at line 102 of file src/core/lib/gprpp/time.h.

◆ ProcessEpoch()

static constexpr Timestamp grpc_core::Timestamp::ProcessEpoch ( )
inlinestaticconstexpr

Definition at line 77 of file src/core/lib/gprpp/time.h.

◆ ToString()

std::string Timestamp::ToString ( ) const

Definition at line 161 of file src/core/lib/gprpp/time.cc.

Member Data Documentation

◆ millis_

int64_t grpc_core::Timestamp::millis_ = 0
private

Definition at line 118 of file src/core/lib/gprpp/time.h.


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


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:37