diff --git a/ixwebsocket/IXBench.cpp b/ixwebsocket/IXBench.cpp index d29f54f4..c9ef2a93 100644 --- a/ixwebsocket/IXBench.cpp +++ b/ixwebsocket/IXBench.cpp @@ -33,16 +33,16 @@ namespace ix void Bench::report() { auto now = std::chrono::high_resolution_clock::now(); - auto milliseconds = std::chrono::duration_cast(now - _start); + auto microseconds = std::chrono::duration_cast(now - _start); - _ms = milliseconds.count(); - std::cerr << _description << " completed in " << _ms << "ms" << std::endl; + _duration = microseconds.count(); + std::cerr << _description << " completed in " << _duration << " us" << std::endl; _reported = true; } uint64_t Bench::getDuration() const { - return _ms; + return _duration; } } // namespace ix diff --git a/ixwebsocket/IXBench.h b/ixwebsocket/IXBench.h index 3c46e192..c825bead 100644 --- a/ixwebsocket/IXBench.h +++ b/ixwebsocket/IXBench.h @@ -24,7 +24,7 @@ namespace ix private: std::string _description; std::chrono::time_point _start; - uint64_t _ms; + uint64_t _duration; bool _reported; }; } // namespace ix