added to misc: timespec_to_stream_with_unit() for printing times either is seconds or miliseconds

This commit is contained in:
2021-06-30 16:30:11 +02:00
parent 0f78968579
commit df3f04a951
3 changed files with 33 additions and 5 deletions

View File

@@ -848,9 +848,9 @@ void App::MakePage()
calculate_timespec_diff(cur.request->timespec_ezc_engine_start, cur.request->timespec_ezc_engine_stop, diff);
pt::TextStream str;
timespec_to_stream(diff, str); // IMPROVEME in the future Log can be used directly
timespec_to_stream_with_unit(diff, str); // IMPROVEME in the future Log can be used directly
log << log3 << "App: ezc engine took: " << str << "s" << logend;
log << log3 << "App: ezc engine took: " << str << logend;
}
@@ -2146,8 +2146,8 @@ void App::LogUserGroups()
void App::LogRequestTime()
{
pt::TextStream str;
timespec_to_stream(cur.request->timespec_req_diff, str);
log << log2 << "App: request took: " << str << "s" << logend;
timespec_to_stream_with_unit(cur.request->timespec_req_diff, str);
log << log2 << "App: request took: " << str << logend;
}