Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Loading...
Searching...
No Matches
ntp.h File Reference

Utitilies for NTP timestamp. More...

#include <errno.h>
#include <sys/time.h>
#include <time.h>
#include "roc_core/errno_to_str.h"
#include "roc_core/panic.h"
#include "roc_packet/units.h"

Go to the source code of this file.

Namespaces

namespace  roc
 Root namespace.
 
namespace  roc::packet
 Network packets and packet processing.
 

Functions

packet::ntp_timestamp_t roc::packet::ntp_timestamp ()
 Get current NTP time.
 
bool roc::packet::ntp_equal_delta (ntp_timestamp_t a, ntp_timestamp_t b, ntp_timestamp_t delta)
 Compares a and b if they close enough.
 
ntp_timestamp_t roc::packet::nanoseconds_2_ntp (core::nanoseconds_t ns)
 Converts nanoseconds to ntp timestamp.
 
core::nanoseconds_t roc::packet::ntp_2_nanoseconds (ntp_timestamp_t ts)
 Converts ntp timestamp to nanoseconds.
 

Detailed Description

Utitilies for NTP timestamp.

Definition in file ntp.h.