Move optimer to utils namespace for consistency

This commit is contained in:
Charles Dang 2024-03-11 12:54:58 -04:00
parent ff4854cc30
commit 3f61aaa8f4
2 changed files with 5 additions and 5 deletions

View file

@ -121,7 +121,7 @@ All content within add-ons uploaded to this server must be licensed under the te
bool timing_reports_enabled = false;
void timing_report_function(const util::ms_optimer& tim, const campaignd::server::request& req, const std::string& label = {})
void timing_report_function(const utils::ms_optimer& tim, const campaignd::server::request& req, const std::string& label = {})
{
if(timing_reports_enabled) {
if(label.empty()) {
@ -132,9 +132,9 @@ void timing_report_function(const util::ms_optimer& tim, const campaignd::server
}
}
inline util::ms_optimer service_timer(const campaignd::server::request& req, const std::string& label = {})
inline utils::ms_optimer service_timer(const campaignd::server::request& req, const std::string& label = {})
{
return util::ms_optimer{std::bind(timing_report_function, std::placeholders::_1, req, label)};
return utils::ms_optimer{std::bind(timing_report_function, std::placeholders::_1, req, label)};
}
//

View file

@ -19,7 +19,7 @@
#include <functional>
#include <iosfwd>
namespace util {
namespace utils {
/**
* Reports time elapsed at the end of an object scope.
@ -104,4 +104,4 @@ inline std::ostream& operator<<(std::ostream& o, const OpTimerType& tm)
*/
using ms_optimer = optimer<std::chrono::milliseconds>;
} // end namespace util
} // end namespace utils