"Fossies" - the Fresh Open Source Software Archive

Member "bonnie++-2.00a/duration.h" (23 Dec 2008, 563 Bytes) of package /linux/privat/bonnie++-2.00a.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "duration.h" see the Fossies "Dox" file reference documentation.

    1 #ifndef DURATION_H
    2 #define DURATION_H
    3 
    4 #include "port.h"
    5 
    6 #include <sys/time.h>
    7 #include <unistd.h>
    8 
    9 class Duration_Base
   10 {
   11 public:
   12   Duration_Base();
   13   virtual ~Duration_Base() {};
   14   void reset(){ m_max = 0.0; }
   15   double start();
   16   double stop();
   17   double getMax() { return m_max; }
   18 
   19   virtual bool getTime(double *tv) = 0;
   20 
   21 private:
   22   double m_start;
   23   double m_max;
   24 };
   25 
   26 class Duration : public Duration_Base
   27 {
   28 public:
   29   virtual bool getTime(double *time);
   30 };
   31 
   32 class CPU_Duration : public Duration_Base
   33 {
   34 public:
   35   virtual bool getTime(double *time);
   36 };
   37 
   38 #endif