mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-03 03:14:17 +00:00
Frontend::tune(): create a streamer using plugin interface to read a byte and return LOCKED event if byte is read Demux::setFrontendDataSource():open a new stream to read data from the socket and push the data read to DVR FMQ. Test: atest VtsHalTvTunerTargetTest Bug: 288170590 Change-Id: Iaf2eae7b4dc9e7d69b1f7b3a367d24f6acdd68be
17 lines
450 B
C++
17 lines
450 B
C++
#include <chrono>
|
|
using namespace std::chrono;
|
|
class Timer {
|
|
public:
|
|
Timer() { start_time = steady_clock::now(); }
|
|
|
|
~Timer() { stop_time = steady_clock::now(); }
|
|
|
|
double get_elapsed_time_ms() {
|
|
auto current_time = std::chrono::steady_clock::now();
|
|
return duration_cast<milliseconds>(current_time - start_time).count();
|
|
}
|
|
|
|
private:
|
|
time_point<steady_clock> start_time;
|
|
time_point<steady_clock> stop_time;
|
|
}; |