Add a testcase for PR ld/12356.
[deliverable/binutils-gdb.git] / gold / timer.cc
index ec51bc9151e133a26caf48cbc44a9dcf441a5e34..d9b8874a59c3cff4c8538d8fc1449d68512abd62 100644 (file)
@@ -1,6 +1,6 @@
 // timer.cc -- helper class for time accounting
 
-// Copyright 2009 Free Software Foundation, Inc.
+// Copyright 2009, 2010 Free Software Foundation, Inc.
 // Written by Rafael Avila de Espindola <espindola@google.com>.
 
 // This file is part of gold.
@@ -22,7 +22,9 @@
 
 #include "gold.h"
 
+#ifdef HAVE_TIMES
 #include <sys/times.h>
+#endif
 
 #include "libiberty.h"
 
@@ -40,9 +42,9 @@ Timer::Timer()
   this->start_time_.sys = 0;
 }
 
-// Start couting the time.
+// Start counting the time.
 void
-Timer::start ()
+Timer::start()
 {
   this->get_time(&this->start_time_);
 }
@@ -61,8 +63,8 @@ Timer::start ()
 # endif
 #endif
 
-// times returns statistics in clock_t units. This variable will hold the
-// conversion factor to seconds. We use a variable that is initialize once
+// times returns statistics in clock_t units.  This variable will hold the
+// conversion factor to seconds.  We use a variable that is initialized once
 // because sysconf can be slow.
 static long ticks_per_sec;
 class Timer_init
@@ -75,9 +77,9 @@ class Timer_init
 };
 Timer_init timer_init;
 
-// Write the current time infortamion.
+// Write the current time information.
 void
-Timer::get_time (TimeStats *now)
+Timer::get_time(TimeStats *now)
 {
 #ifdef HAVE_TIMES
   tms t;
@@ -93,7 +95,7 @@ Timer::get_time (TimeStats *now)
 
 // Return the stats since start was called.
 Timer::TimeStats
-Timer::get_elapsed_time ()
+Timer::get_elapsed_time()
 {
   TimeStats now;
   this->get_time(&now);
This page took 0.025327 seconds and 4 git commands to generate.