From: Joel Rosdahl Date: Mon, 24 Nov 2025 19:53:50 +0000 (+0100) Subject: refactor: Add missing util namespace to Timer X-Git-Tag: v4.13~60 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4b83b11fa01d9cc60fb3eb3f2f4e8a5d9242a85d;p=thirdparty%2Fccache.git refactor: Add missing util namespace to Timer --- diff --git a/src/ccache/storage/storage.cpp b/src/ccache/storage/storage.cpp index 069e51be..29501634 100644 --- a/src/ccache/storage/storage.cpp +++ b/src/ccache/storage/storage.cpp @@ -468,7 +468,7 @@ Storage::get_from_remote_storage(const Hash::Digest& key, continue; } - Timer timer; + util::Timer timer; auto result = backend->impl->get(key); const auto ms = timer.measure_ms(); if (!result) { @@ -516,7 +516,7 @@ Storage::put_in_remote_storage(const Hash::Digest& key, continue; } - Timer timer; + util::Timer timer; const auto result = backend->impl->put(key, value, overwrite); const auto ms = timer.measure_ms(); if (!result) { @@ -544,7 +544,7 @@ Storage::remove_from_remote_storage(const Hash::Digest& key) continue; } - Timer timer; + util::Timer timer; const auto result = backend->impl->remove(key); const auto ms = timer.measure_ms(); if (!result) { diff --git a/src/ccache/util/timer.hpp b/src/ccache/util/timer.hpp index 8065dad2..ea3e8d1d 100644 --- a/src/ccache/util/timer.hpp +++ b/src/ccache/util/timer.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2021 Joel Rosdahl and other contributors +// Copyright (C) 2021-2025 Joel Rosdahl and other contributors // // See doc/authors.adoc for a complete list of contributors. // @@ -21,6 +21,8 @@ #include #include +namespace util { + class Timer { public: @@ -50,3 +52,5 @@ Timer::measure_ms() const { return measure_s() * 1000; } + +} // namespace util