gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git] / gold / timer.h
index 1600948c2d76c3d93456f5f87ce521f770822568..f1116dd2888e54bd13e566ab89584d69f381465d 100644 (file)
@@ -1,6 +1,6 @@
 // timer.h -- helper class for time accounting   -*- C++ -*-
 
-// Copyright 2009 Free Software Foundation, Inc.
+// Copyright (C) 2009-2020 Free Software Foundation, Inc.
 // Written by Rafael Avila de Espindola <espindola@google.com>.
 
 // This file is part of gold.
@@ -48,21 +48,32 @@ class Timer
   TimeStats
   get_elapsed_time();
 
-  // Start couting the time.
+  // Return the stats for pass N (0 <= N <= 2).
+  TimeStats
+  get_pass_time(int n);
+
+  // Start counting the time.
   void
   start();
 
+  // Record the time used by pass N (0 <= N <= 2).
+  void
+  stamp(int n);
+
  private:
   // This class cannot be copied.
   Timer(const Timer&);
   Timer& operator=(const Timer&);
 
-  // Write the current time infortamion.
+  // Write the current time information.
   static void
   get_time(TimeStats* now);
 
   // The time of the last call to start.
   TimeStats start_time_;
+
+  // Times for each pass.
+  TimeStats pass_times_[3];
 };
 
 }
This page took 0.030578 seconds and 4 git commands to generate.