Template Function cras::sec

Function Documentation

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

Get the whole number of seconds from the given time.

Get the whole number of seconds from the given duration.

Template Parameters:
  • T1 – Time type.

  • T1 – Duration type.

Parameters:
  • t – Time to convert.

  • t – Duration to convert.

Returns:

The number of whole seconds.

Returns:

The number of whole seconds.