Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
time.h File Reference

Time definitions. More...

#include "roc_core/stddefs.h"
Include dependency graph for time.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 roc
 Root namespace.
 
 roc::core
 General-purpose building blocks and platform abstraction layer.
 

Typedefs

typedef int64_t roc::core::nanoseconds_t
 Nanoseconds. More...
 

Enumerations

enum  roc::core::clock_t { roc::core::ClockMonotonic , roc::core::ClockUnix }
 Clock identifier. More...
 

Functions

nanoseconds_t roc::core::timestamp (clock_t clock)
 Get current timestamp in nanoseconds. More...
 
void roc::core::sleep_until (clock_t clock, nanoseconds_t timestamp)
 Sleep until the specified absolute time point has been reached. More...
 
void roc::core::sleep_for (clock_t clock, nanoseconds_t duration)
 Sleep specified amount of time. More...
 
std::tm roc::core::nanoseconds_2_tm (nanoseconds_t timestamp)
 Convert timestamp in nanoseconds format to broken-down time. More...
 
nanoseconds_t roc::core::tm_2_nanoseconds (std::tm tm)
 Convert timestamp from broken-down time to nanoseconds format. More...
 
bool roc::core::ns_equal_delta (nanoseconds_t a, nanoseconds_t b, nanoseconds_t delta)
 Compares a and b if they close enough. More...
 

Variables

const nanoseconds_t roc::core::Nanosecond = 1
 One nanosecond represented in nanoseconds. More...
 
const nanoseconds_t roc::core::Microsecond = 1000 * Nanosecond
 One microsecond represented in nanoseconds. More...
 
const nanoseconds_t roc::core::Millisecond = 1000 * Microsecond
 One millisecond represented in nanoseconds. More...
 
const nanoseconds_t roc::core::Second = 1000 * Millisecond
 One second represented in nanoseconds. More...
 
const nanoseconds_t roc::core::Minute = 60 * Second
 One minute represented in nanoseconds. More...
 
const nanoseconds_t roc::core::Hour = 60 * Minute
 One hour represented in nanoseconds. More...
 
const nanoseconds_t roc::core::Day = 24 * Hour
 One day represented in nanoseconds. More...
 

Detailed Description

Time definitions.

Definition in file time.h.