File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
demos/gesture_recognition_demo/cpp_gapi/include Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -47,10 +47,10 @@ class BatchProducer {
47
47
ptr[0 ] = first_el; // position of start of batch in cyclic buffer
48
48
batch_lock.unlock ();
49
49
const auto cur_step = std::chrono::steady_clock::now () - time;
50
- const auto gap = std::chrono::duration_cast<std::chrono::milliseconds>(cur_step). count () ;
51
- const int time_step = int (1000 .f / batch_fps); // 1/15 sec
50
+ const auto gap = std::chrono::duration_cast<std::chrono::milliseconds>(cur_step);
51
+ const auto time_step = std::chrono::milliseconds ( int (1000 .f / batch_fps) ); // 1/15 sec
52
52
if (gap < time_step) {
53
- std::this_thread::sleep_for (std::chrono::milliseconds ( time_step - gap) ); // wait for constant step of batch update
53
+ std::this_thread::sleep_for (time_step - gap); // wait for constant step of batch update
54
54
}
55
55
}
56
56
private:
@@ -157,10 +157,10 @@ class CustomCapSource : public cv::gapi::wip::IStreamSource
157
157
producer.fillFastFrame (fast_frame);
158
158
if (wait_gap) {
159
159
const auto cur_step = std::chrono::steady_clock::now () - read_time;
160
- const auto gap = std::chrono::duration_cast<std::chrono::milliseconds>(cur_step). count () ;
161
- const int time_step = int (1000 . / source_fps);
160
+ const auto gap = std::chrono::duration_cast<std::chrono::milliseconds>(cur_step);
161
+ const auto time_step = std::chrono::milliseconds ( int (1000 .f / source_fps) );
162
162
if (gap < time_step) {
163
- std::this_thread::sleep_for (std::chrono::milliseconds ( time_step - gap) );
163
+ std::this_thread::sleep_for (time_step - gap);
164
164
}
165
165
}
166
166
You can’t perform that action at this time.
0 commit comments