SoapySDR  0.5.4-g68d0793c
Vendor and platform neutral SDR interface library
Functions
Time.h File Reference
#include <SoapySDR/Config.h>

Go to the source code of this file.

Functions

SOAPY_SDR_API long long SoapySDR_ticksToTimeNs (const long long ticks, const double rate)
 
SOAPY_SDR_API long long SoapySDR_timeNsToTicks (const long long timeNs, const double rate)
 

Detailed Description

Utility functions to convert time and ticks.

Function Documentation

SOAPY_SDR_API long long SoapySDR_ticksToTimeNs ( const long long  ticks,
const double  rate 
)

Convert a tick count into a time in nanoseconds using the tick rate.

Parameters
ticksa integer tick count
ratethe ticks per second
Returns
the time in nanoseconds
SOAPY_SDR_API long long SoapySDR_timeNsToTicks ( const long long  timeNs,
const double  rate 
)

Convert a time in nanoseconds into a tick count using the tick rate.

Parameters
timeNstime in nanoseconds
ratethe ticks per second
Returns
the integer tick count