use the std::chrono duration the way it should be

This commit is contained in:
sam gateau 2018-09-11 15:57:57 -07:00
parent 3fc47bf6fc
commit 8c7781a6d4

View file

@ -63,7 +63,7 @@ void GLBackend::do_endQuery(const Batch& batch, size_t paramOffset) {
#endif
--_queryStage._rangeQueryDepth;
auto duration_ns = (std::chrono::high_resolution_clock::now() - glquery->_batchElapsedTimeBegin);
auto duration_ns = std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::high_resolution_clock::now() - glquery->_batchElapsedTimeBegin);
glquery->_batchElapsedTime = duration_ns.count();
PROFILE_RANGE_END(render_gpu_gl_detail, glquery->_profileRangeId);