]> git.mxchange.org Git - simgear.git/blobdiff - simgear/misc/stopwatch.hxx
Updates to build system to better support automake-1.5
[simgear.git] / simgear / misc / stopwatch.hxx
index f901939302bf5731357924f70c4f09c4c9ae99ff..bb8ebc4fb1c4ca5f9b6c7e686b48484e7c241882 100644 (file)
@@ -1,27 +1,34 @@
-/***************************************************************************
- * stopwatch.hxx        Timer class, for use in benchmarking
- *
+/**
+ * \file stopwatch.hxx
+ * Timer class, for use in benchmarking
  * Based on blitz/Timer.h
  *
- * $Id$
- *
  * Copyright (C) 1997,1998 Todd Veldhuizen <tveldhui@seurat.uwaterloo.ca>
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
  * Suggestions:          blitz-suggest@cybervision.com
  * Bugs:                 blitz-bugs@cybervision.com
  *
  * For more information, please see the Blitz++ Home Page:
  *    http://seurat.uwaterloo.ca/blitz/
+ */
+
+/*
+ * $Id$
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA  02111-1307, USA.
  *
  */
 
 #  include <time.h>
 #endif
 
+/**
+ * A high resolutions timing class
+ */
 class StopWatch {
 
 public:
-    StopWatch() 
-    { 
-//         state_ = uninitialized;
+    /** Constructor */
+    StopWatch() 
+       // state_ = uninitialized;
     }
 
-    void start()
-    { 
-//         state_ = running;
+    /** Start counting time */
+    void start() 
+       // state_ = running;
         t1_ = systemTime();
     }
 
-    void stop()
-    {
+    /** Stop counting time */
+    void stop() {
         t2_ = systemTime();
-//     BZPRECONDITION(state_ == running);
-//     state_ = stopped;
+       // BZPRECONDITION(state_ == running);
+       // state_ = stopped;
     }
 
+    /** @return the elapsed time between start and stop */
     double elapsedSeconds()
     {
-//         BZPRECONDITION(state_ == stopped);
+       // BZPRECONDITION(state_ == stopped);
         return t2_ - t1_;
     }