X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gold%2Ftimer.h;h=47067cb1116206be4c9424beb2560a2fe504e3fd;hb=945e0f82dad31db89a107b496532886fe215c011;hp=50b55e49dd0802b5238b191cc06b8570b99a6942;hpb=9b547ce6834ed6367db2e76b2c4c2e99b188fc9b;p=deliverable%2Fbinutils-gdb.git diff --git a/gold/timer.h b/gold/timer.h index 50b55e49dd..47067cb111 100644 --- a/gold/timer.h +++ b/gold/timer.h @@ -1,6 +1,6 @@ // timer.h -- helper class for time accounting -*- C++ -*- -// Copyright 2009, 2010 Free Software Foundation, Inc. +// Copyright (C) 2009-2016 Free Software Foundation, Inc. // Written by Rafael Avila de Espindola . // This file is part of gold. @@ -48,10 +48,18 @@ class Timer TimeStats get_elapsed_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&); @@ -63,6 +71,9 @@ class Timer // The time of the last call to start. TimeStats start_time_; + + // Times for each pass. + TimeStats pass_times_[3]; }; }