Scarab  v1.5.2
Project 8 C++ Utility Library
Namespaces | Macros | Typedefs | Functions
time.hh File Reference
#include "scarab_api.hh"
#include <cstdint>
#include <string>
#include <sys/time.h>
#include <time.h>
Include dependency graph for time.hh:

Go to the source code of this file.

Namespaces

 scarab
 

Macros

#define NSEC_PER_SEC   1000000000
 
#define SEC_PER_NSEC   1.e-9
 

Typedefs

typedef uint64_t time_nsec_type
 

Functions

bool operator== (const timespec &lhs, const timespec &rhs)
 
bool operator< (const timespec &lhs, const timespec &rhs)
 
int get_time_monotonic (struct timespec *time)
 
int get_time_current (struct timespec *time)
 
time_nsec_type time_to_nsec (struct timespec time)
 
double time_to_sec (struct timespec time)
 
void time_diff (struct timespec start, struct timespec end, struct timespec *diff)
 
size_t get_time_absolute_str (char *ptr)
 
std::string get_absolute_time_string ()
 

Macro Definition Documentation

#define NSEC_PER_SEC   1000000000

Definition at line 26 of file time.hh.

#define SEC_PER_NSEC   1.e-9

Definition at line 30 of file time.hh.

Function Documentation

bool operator< ( const timespec &  lhs,
const timespec &  rhs 
)
inline

Definition at line 54 of file time.hh.

bool operator== ( const timespec &  lhs,
const timespec &  rhs 
)
inline

Definition at line 53 of file time.hh.