]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
refactor: Add missing util namespace to Timer
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 24 Nov 2025 19:53:50 +0000 (20:53 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Sat, 6 Dec 2025 09:59:24 +0000 (10:59 +0100)
src/ccache/storage/storage.cpp
src/ccache/util/timer.hpp

index 069e51be3de1f1aa5f81613ed5077d0ebc95a0de..29501634fceddcd397b3352e7101753039eabad4 100644 (file)
@@ -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) {
index 8065dad2df860c1dd0ba3ffd48e4aa529bbf98ab..ea3e8d1d7352f6ea5da2ae95391a8853a7e4fd05 100644 (file)
@@ -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 <chrono>
 #include <string>
 
+namespace util {
+
 class Timer
 {
 public:
@@ -50,3 +52,5 @@ Timer::measure_ms() const
 {
   return measure_s() * 1000;
 }
+
+} // namespace util