SoapySDR  0.4.4-gdb459f4f
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