Template Function cras::secNsec

Function Documentation

template<typename T1, typename ::std::enable_if_t<::cras::TimeType<T1>::value>* = nullptr>
std::pair<int32_t, uint32_t> cras::secNsec(const T1 &t)

Split the given time to seconds and the fractional second converted to nanoseconds.

Split the given duration to seconds and the fractional second converted to nanoseconds.

Template Parameters:
  • T1 – Time type.

  • T1 – Duration type.

Parameters:
  • t – Time to convert.

  • t – Duration to convert.

Returns:

A pair consisting of the whole number of seconds and the number of nanoseconds in the fractional second.

Returns:

A pair consisting of the whole number of seconds and the number of nanoseconds in the fractional second.