]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common/Cycles.cc: reduce scope of variable
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 8 Jan 2015 16:26:44 +0000 (17:26 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 3 Feb 2015 21:51:08 +0000 (22:51 +0100)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/common/Cycles.cc

index b3f610d2649e5fa5a7c9272605be7661b227c3ed..a2efcf34b8f3aa194fc3617e826f0ae51a2a911f 100644 (file)
@@ -57,7 +57,7 @@ void Cycles::init()
   // After 10ms have elapsed, take the ratio between these readings.
 
   struct timeval start_time, stop_time;
-  uint64_t start_cycles, micros;
+  uint64_t micros;
   double old_cycles;
 
   // There is one tricky aspect, which is that we could get interrupted
@@ -70,7 +70,7 @@ void Cycles::init()
     if (gettimeofday(&start_time, NULL) != 0) {
       assert(0 == "couldn't read clock");
     }
-    start_cycles = rdtsc();
+    uint64_t start_cycles = rdtsc();
     while (1) {
       if (gettimeofday(&stop_time, NULL) != 0) {
         assert(0 == "couldn't read clock");