Dynamic Load Balance 3.6.1+32-59d1
Data Structures | Enumerations | Functions
mytime.c File Reference
#include "support/mytime.h"
#include "support/debug.h"
#include <stdlib.h>
#include <string.h>
#include <math.h>
Include dependency graph for mytime.c:

Data Structures

struct  timer_data_t
 

Enumerations

enum  { MS_PER_SECOND = 1000LL }
 
enum  { US_PER_SECOND = 1000000LL }
 
enum  { NS_PER_SECOND = 1000000000LL }
 
enum  { TIMER_MAX_KEY_LEN = 128 }
 

Functions

void get_time (struct timespec *t)
 
void get_time_coarse (struct timespec *t)
 
void get_time_real (struct timespec *t)
 
int64_t get_time_in_ns (void)
 
int diff_time (struct timespec init, struct timespec end, struct timespec *diff)
 
void add_time (struct timespec t1, struct timespec t2, struct timespec *sum)
 
void mult_time (struct timespec t1, int factor, struct timespec *prod)
 
void diff_time_mult (struct timespec *time, int mult_factor, struct timespec *result)
 
void reset (struct timespec *t1)
 
double to_secs (struct timespec t1)
 
int64_t to_nsecs (const struct timespec *ts)
 
double nsecs_to_secs (int64_t nsecs)
 
int64_t timeval_diff (const struct timeval *init, const struct timeval *end)
 
int64_t timespec_diff (const struct timespec *init, const struct timespec *end)
 
void add_tv_to_ts (const struct timeval *t1, const struct timeval *t2, struct timespec *res)
 
void ns_to_human (char *buf, size_t size, int64_t ns)
 
void timer_init (void)
 
void * timer_register (const char *key)
 
void timer_start (void *handler)
 
void timer_stop (void *handler)
 
void timer_finalize (void)
 
char * get_iso_8601_string (struct tm *tm_info)
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
MS_PER_SECOND 

◆ anonymous enum

anonymous enum
Enumerator
US_PER_SECOND 

◆ anonymous enum

anonymous enum
Enumerator
NS_PER_SECOND 

◆ anonymous enum

anonymous enum
Enumerator
TIMER_MAX_KEY_LEN 

Function Documentation

◆ get_time()

void get_time ( struct timespec *  t)

◆ get_time_coarse()

void get_time_coarse ( struct timespec *  t)

◆ get_time_real()

void get_time_real ( struct timespec *  t)

◆ get_time_in_ns()

int64_t get_time_in_ns ( void  )

◆ diff_time()

int diff_time ( struct timespec  init,
struct timespec  end,
struct timespec *  diff 
)

◆ add_time()

void add_time ( struct timespec  t1,
struct timespec  t2,
struct timespec *  sum 
)

◆ mult_time()

void mult_time ( struct timespec  t1,
int  factor,
struct timespec *  prod 
)

◆ diff_time_mult()

void diff_time_mult ( struct timespec *  time,
int  mult_factor,
struct timespec *  result 
)

◆ reset()

void reset ( struct timespec *  t1)

◆ to_secs()

double to_secs ( struct timespec  t1)

◆ to_nsecs()

int64_t to_nsecs ( const struct timespec *  ts)

◆ nsecs_to_secs()

double nsecs_to_secs ( int64_t  nsecs)

◆ timeval_diff()

int64_t timeval_diff ( const struct timeval *  init,
const struct timeval *  end 
)

◆ timespec_diff()

int64_t timespec_diff ( const struct timespec *  init,
const struct timespec *  end 
)

◆ add_tv_to_ts()

void add_tv_to_ts ( const struct timeval *  t1,
const struct timeval *  t2,
struct timespec *  res 
)

◆ ns_to_human()

void ns_to_human ( char *  buf,
size_t  size,
int64_t  ns 
)

◆ timer_init()

void timer_init ( void  )

◆ timer_register()

void * timer_register ( const char *  key)

◆ timer_start()

void timer_start ( void *  handler)

◆ timer_stop()

void timer_stop ( void *  handler)

◆ timer_finalize()

void timer_finalize ( void  )

◆ get_iso_8601_string()

char * get_iso_8601_string ( struct tm *  tm_info)