GRPC Core  1.0.0
Data Structures | Macros | Typedefs | Enumerations | Functions
time.h File Reference
#include <grpc/impl/codegen/port_platform.h>
#include <stddef.h>
#include <time.h>

Go to the source code of this file.

Data Structures

struct  gpr_timespec
 

Macros

#define GPR_MS_PER_SEC   1000
 
#define GPR_US_PER_SEC   1000000
 
#define GPR_NS_PER_SEC   1000000000
 
#define GPR_NS_PER_MS   1000000
 
#define GPR_NS_PER_US   1000
 
#define GPR_US_PER_MS   1000
 

Typedefs

typedef struct gpr_timespec gpr_timespec
 

Enumerations

enum  gpr_clock_type { GPR_CLOCK_MONOTONIC = 0, GPR_CLOCK_REALTIME, GPR_CLOCK_PRECISE, GPR_TIMESPAN }
 

Functions

GPRAPI gpr_timespec gpr_time_0 (gpr_clock_type type)
 
GPRAPI gpr_timespec gpr_inf_future (gpr_clock_type type)
 
GPRAPI gpr_timespec gpr_inf_past (gpr_clock_type type)
 
GPRAPI void gpr_time_init (void)
 
GPRAPI gpr_timespec gpr_now (gpr_clock_type clock)
 
GPRAPI gpr_timespec gpr_convert_clock_type (gpr_timespec t, gpr_clock_type target_clock)
 
GPRAPI int gpr_time_cmp (gpr_timespec a, gpr_timespec b)
 
GPRAPI gpr_timespec gpr_time_max (gpr_timespec a, gpr_timespec b)
 
GPRAPI gpr_timespec gpr_time_min (gpr_timespec a, gpr_timespec b)
 
GPRAPI gpr_timespec gpr_time_add (gpr_timespec a, gpr_timespec b)
 
GPRAPI gpr_timespec gpr_time_sub (gpr_timespec a, gpr_timespec b)
 
GPRAPI gpr_timespec gpr_time_from_micros (int64_t x, gpr_clock_type clock_type)
 
GPRAPI gpr_timespec gpr_time_from_nanos (int64_t x, gpr_clock_type clock_type)
 
GPRAPI gpr_timespec gpr_time_from_millis (int64_t x, gpr_clock_type clock_type)
 
GPRAPI gpr_timespec gpr_time_from_seconds (int64_t x, gpr_clock_type clock_type)
 
GPRAPI gpr_timespec gpr_time_from_minutes (int64_t x, gpr_clock_type clock_type)
 
GPRAPI gpr_timespec gpr_time_from_hours (int64_t x, gpr_clock_type clock_type)
 
GPRAPI int32_t gpr_time_to_millis (gpr_timespec timespec)
 
GPRAPI int gpr_time_similar (gpr_timespec a, gpr_timespec b, gpr_timespec threshold)
 
GPRAPI void gpr_sleep_until (gpr_timespec until)
 
GPRAPI double gpr_timespec_to_micros (gpr_timespec t)
 

Macro Definition Documentation

#define GPR_MS_PER_SEC   1000
#define GPR_NS_PER_MS   1000000
#define GPR_NS_PER_SEC   1000000000
#define GPR_NS_PER_US   1000
#define GPR_US_PER_MS   1000
#define GPR_US_PER_SEC   1000000

Typedef Documentation

typedef struct gpr_timespec gpr_timespec

Enumeration Type Documentation

Enumerator
GPR_CLOCK_MONOTONIC 
GPR_CLOCK_REALTIME 
GPR_CLOCK_PRECISE 
GPR_TIMESPAN 

Function Documentation

GPRAPI gpr_timespec gpr_convert_clock_type ( gpr_timespec  t,
gpr_clock_type  target_clock 
)
GPRAPI gpr_timespec gpr_inf_future ( gpr_clock_type  type)
GPRAPI gpr_timespec gpr_inf_past ( gpr_clock_type  type)
GPRAPI gpr_timespec gpr_now ( gpr_clock_type  clock)
GPRAPI void gpr_sleep_until ( gpr_timespec  until)
GPRAPI gpr_timespec gpr_time_0 ( gpr_clock_type  type)
GPRAPI gpr_timespec gpr_time_add ( gpr_timespec  a,
gpr_timespec  b 
)
GPRAPI int gpr_time_cmp ( gpr_timespec  a,
gpr_timespec  b 
)
GPRAPI gpr_timespec gpr_time_from_hours ( int64_t  x,
gpr_clock_type  clock_type 
)
GPRAPI gpr_timespec gpr_time_from_micros ( int64_t  x,
gpr_clock_type  clock_type 
)
GPRAPI gpr_timespec gpr_time_from_millis ( int64_t  x,
gpr_clock_type  clock_type 
)
GPRAPI gpr_timespec gpr_time_from_minutes ( int64_t  x,
gpr_clock_type  clock_type 
)
GPRAPI gpr_timespec gpr_time_from_nanos ( int64_t  x,
gpr_clock_type  clock_type 
)
GPRAPI gpr_timespec gpr_time_from_seconds ( int64_t  x,
gpr_clock_type  clock_type 
)
GPRAPI void gpr_time_init ( void  )
GPRAPI gpr_timespec gpr_time_max ( gpr_timespec  a,
gpr_timespec  b 
)
GPRAPI gpr_timespec gpr_time_min ( gpr_timespec  a,
gpr_timespec  b 
)
GPRAPI int gpr_time_similar ( gpr_timespec  a,
gpr_timespec  b,
gpr_timespec  threshold 
)
GPRAPI gpr_timespec gpr_time_sub ( gpr_timespec  a,
gpr_timespec  b 
)
GPRAPI int32_t gpr_time_to_millis ( gpr_timespec  timespec)
GPRAPI double gpr_timespec_to_micros ( gpr_timespec  t)