Browse Source

Minor touchups to App/start.cpp

Ian Goldberg 11 months ago
parent
commit
46e6ab74a4
1 changed files with 7 additions and 7 deletions
  1. 7 7
      App/start.cpp

+ 7 - 7
App/start.cpp

@@ -13,7 +13,7 @@ int epoch_wait_time = 5;
 int num_WN_to_precompute = 12;
 // We'll always run the WN precomputation in the foreground
 // TODO: Later fix this to a command line param
-bool FOREGROUND_PRECOMPUTE = true;
+static const bool FOREGROUND_PRECOMPUTE = true;
 
 #define CEILDIV(x,y) (((x)+(y)-1)/(y))
 
@@ -25,9 +25,9 @@ class Epoch {
     std::mutex m;
     std::condition_variable cv;
     bool epoch_complete;
-    #ifdef DEBUG_PUB_TIMES
+#ifdef DEBUG_PUB_TIMES
     unsigned long lt = 0;
-    #endif
+#endif
 
     void round_cb(uint32_t round_num) {
         struct timeval now;
@@ -36,7 +36,7 @@ class Epoch {
             printf("%lu.%06lu: Round %u complete\n", now.tv_sec,
                 now.tv_usec, round_num);
 
-            #ifdef DEBUG_PUB_TIMES
+#ifdef DEBUG_PUB_TIMES
             struct timespec tp;
             clock_gettime(CLOCK_REALTIME_COARSE, &tp);
             unsigned long time = tp.tv_sec * 1000000 + tp.tv_nsec/1000;
@@ -46,7 +46,7 @@ class Epoch {
             } else {
                 printf("Time since last round_cb = %lu.%lu\n", (time-lt)/1000000, (time-lt)%1000000);
             }
-            #endif
+#endif
 
             boost::asio::post(netio.io_context(), [this]{
                 proceed();
@@ -60,13 +60,13 @@ class Epoch {
             }
 
 
-            #ifdef DEBUG_PUB_TIMES
+#ifdef DEBUG_PUB_TIMES
                 struct timespec tp;
                 clock_gettime(CLOCK_REALTIME_COARSE, &tp);
                 unsigned long time = tp.tv_sec * 1000000 + tp.tv_nsec/1000;
                 printf("Epoch end. Time since last round_cb = %lu.%lu\n", (time-lt)/1000000, (time-lt)%1000000);
                 lt = 0;
-            #endif
+#endif
 
             const NodeConfig &my_conf = netio.myconfig();
             if(my_conf.roles & ROLE_STORAGE) {