I am working on c++ code where I am trying to save chrono time
in a list so that I can read the value later on and can calculate the time duration.
The reason of saving the time in list is because I have multiple objects where I need to capture the current time of when that object was detected and then later when that object goes away, I have to calculate duration of time for that object.
list <double> dTimeList;
auto start = std::chrono::high_resolution_clock::now();
auto it = dTimeList.begin();
advance(it, detection.object_id);
dTimeList.insert(it, start ); //But this is giving error
Severity Code Description Project File Line Suppression State Error (active) E0304 no instance of overloaded function "std::list<_Ty, _Alloc>::insert [with _Ty=double, _Alloc=std::allocator<double>]" matches the argument list ThingTraxVision C:\Program Files (x86)\IntelSWTools\openvino_2019.1.133\deployment_tools\inference_engine\samples\ThingTraxVision\main.cpp 267
Severity Code Description Project File Line Suppression State Error C2664 'std::_List_iterator<std::_List_val<std::_List_simple_types<_Ty>>> std::list<_Ty,std::allocator<_Ty>>::insert(std::_List_const_iterator<std::_List_val<std::_List_simple_types<_Ty>>>,unsigned __int64,const _Ty &)': cannot convert argument 2 from 'std::chrono::steady_clock::time_point' to '_Ty &&' ThingTraxVision C:\Program Files (x86)\IntelSWTools\openvino_2019.1.133\deployment_tools\inference_engine\samples\ThingTraxVision\main.cpp 267
Aucun commentaire:
Enregistrer un commentaire