mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Use duration in insight::Event, add chrono_util
This commit is contained in:
@@ -153,18 +153,11 @@ public:
|
||||
template <class Duration>
|
||||
void operator() (Duration const& elapsed) const
|
||||
{
|
||||
auto ms (std::chrono::duration_cast <
|
||||
std::chrono::milliseconds> (elapsed));
|
||||
latency.notify (ms.count());
|
||||
auto ms (ceil <std::chrono::milliseconds> (elapsed));
|
||||
latency.notify (ms);
|
||||
if (ms.count() >= 500)
|
||||
journal.warning <<
|
||||
"io_service latency = " << ms;
|
||||
|
||||
#if 0
|
||||
std::stringstream ss;
|
||||
ss << "io_service latency = " << ms;
|
||||
Logger::outputDebugString (ss.str());
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user