osmosdr::time_spec_t
boost::additive< time_spec_t >
boost::totally_ordered< time_spec_t >
time_spec.h
time_t time_t osmosdr::time_spec_t::_full_secs _full_secs osmosdr::time_spec_t::_full_secs
double double osmosdr::time_spec_t::_frac_secs _frac_secs osmosdr::time_spec_t::_frac_secs
time_spec_t static time_spec_t osmosdr::time_spec_t::get_system_time (void) get_system_time osmosdr::time_spec_t::get_system_time void

Get the system time in time_spec_t format. Uses the highest precision clock available.

the system time as a time_spec_t

time_spec_t static time_spec_t osmosdr::time_spec_t::from_ticks (long long ticks, double tick_rate) from_ticks osmosdr::time_spec_t::from_ticks long long ticks double tick_rate

Create a time_spec_t from a 64-bit tick count. Translation from clock-domain specific units. ticks

an integer count of ticks

tick_rate

the number of ticks per second

osmosdr::time_spec_t::time_spec_t
(double secs=0)
time_spec_t
osmosdr::time_spec_t::time_spec_t
double secs 0

Create a time_spec_t from a real-valued seconds count. secs

the real-valued seconds count (default = 0)

osmosdr::time_spec_t::time_spec_t
(time_t full_secs, double frac_secs=0)
time_spec_t
osmosdr::time_spec_t::time_spec_t
time_t full_secs
double frac_secs 0

Create a time_spec_t from whole and fractional seconds. full_secs

the whole/integer seconds count

frac_secs

the fractional seconds count (default = 0)

osmosdr::time_spec_t::time_spec_t
(time_t full_secs, long tick_count, double tick_rate)
time_spec_t
osmosdr::time_spec_t::time_spec_t
time_t full_secs
long tick_count
double tick_rate

Create a time_spec_t from whole seconds and fractional ticks. Translation from clock-domain specific units. full_secs

the whole/integer seconds count

tick_count

the fractional seconds tick count

tick_rate

the number of ticks per second

long long osmosdr::time_spec_t::get_tick_count (double tick_rate) const get_tick_count osmosdr::time_spec_t::get_tick_count double tick_rate

Convert the fractional seconds to clock ticks. Translation into clock-domain specific units. tick_rate

the number of ticks per second

the fractional seconds tick count

long long long long osmosdr::time_spec_t::to_ticks (const double tick_rate) const to_ticks osmosdr::time_spec_t::to_ticks const double tick_rate

Convert the time spec into a 64-bit tick count. Translation into clock-domain specific units. tick_rate

the number of ticks per second

an integer number of ticks

double double osmosdr::time_spec_t::get_real_secs (void) const get_real_secs osmosdr::time_spec_t::get_real_secs void

Get the time as a real-valued seconds count. Note: If this time_spec_t represents an absolute time, the precision of the fractional seconds may be lost.

the real-valued seconds

time_t time_t osmosdr::time_spec_t::get_full_secs (void) const get_full_secs osmosdr::time_spec_t::get_full_secs void

Get the whole/integer part of the time in seconds.

the whole/integer seconds

double double osmosdr::time_spec_t::get_frac_secs (void) const get_frac_secs osmosdr::time_spec_t::get_frac_secs void

Get the fractional part of the time in seconds.

the fractional seconds

time_spec_t & time_spec_t & osmosdr::time_spec_t::operator+= (const time_spec_t &) operator+= osmosdr::time_spec_t::operator+= const time_spec_t &

Implement addable interface.

time_spec_t & time_spec_t & osmosdr::time_spec_t::operator-= (const time_spec_t &) operator-= osmosdr::time_spec_t::operator-= const time_spec_t &

Implement subtractable interface.

A time_spec_t holds a seconds and a fractional seconds time value. Depending upon usage, the time_spec_t can represent absolute times, relative times, or time differences (between absolute times).

The time_spec_t provides clock-domain independent time storage, but can convert fractional seconds to/from clock-domain specific units.

The fractional seconds are stored as double precision floating point. This gives the fractional seconds enough precision to unambiguously specify a clock-tick/sample-count up to rates of several petahertz.

boost::additive< time_spec_t >
boost::totally_ordered< time_spec_t >
osmosdr::time_spec_t
boost::additive< time_spec_t >
boost::totally_ordered< time_spec_t >
osmosdr::time_spec_t
- osmosdr::time_spec_t
  _frac_secs
- osmosdr::time_spec_t
  _full_secs
- osmosdr::time_spec_t
  from_ticks
- osmosdr::time_spec_t
  get_frac_secs
- osmosdr::time_spec_t
  get_full_secs
- osmosdr::time_spec_t
  get_real_secs
- osmosdr::time_spec_t
  get_system_time
- osmosdr::time_spec_t
  get_tick_count
- osmosdr::time_spec_t
  operator+=
- osmosdr::time_spec_t
  operator-=
- osmosdr::time_spec_t
  time_spec_t
- osmosdr::time_spec_t
  time_spec_t
- osmosdr::time_spec_t
  time_spec_t
- osmosdr::time_spec_t
  to_ticks