mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 12:45:35 +08:00
[fix] use proper std::chrono clock
This commit is contained in:
@@ -18,11 +18,11 @@
|
||||
|
||||
#include "nvcuvid.h"
|
||||
|
||||
#define START_TIMER auto start = std::chrono::high_resolution_clock::now();
|
||||
#define START_TIMER auto start = std::chrono::steady_clock::now();
|
||||
#define STOP_TIMER(print_message) \
|
||||
std::cout << print_message \
|
||||
<< std::chrono::duration_cast<std::chrono::milliseconds>( \
|
||||
std::chrono::high_resolution_clock::now() - start) \
|
||||
std::chrono::steady_clock::now() - start) \
|
||||
.count() \
|
||||
<< " ms " << std::endl;
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@ int OpenH264Encoder::Encode(
|
||||
raw_frame_.iPicHeight = frame_height_;
|
||||
raw_frame_.iColorFormat = EVideoFormatType::videoFormatI420;
|
||||
raw_frame_.uiTimeStamp =
|
||||
std::chrono::high_resolution_clock::now().time_since_epoch().count();
|
||||
std::chrono::system_clock::now().time_since_epoch().count();
|
||||
|
||||
raw_frame_.iStride[0] = frame_width_;
|
||||
raw_frame_.iStride[1] = frame_width_ >> 1;
|
||||
|
||||
Reference in New Issue
Block a user