FramerateCounter.h
Go to the documentation of this file.
00001 /******************************************************************************
00002  * Copyright (c) 2012, 2013 All Rights Reserved, http://www.optris.de         *                                                                          *
00003  *  Optris GmbH                                                               *
00004  *  Ferdinand-Buisson-Str. 14                                                 *
00005  *  13127 Berlin                                                              *
00006  *  Germany                                                                   *
00007  *                                                                            *
00008  * Contributors:                                                              *
00009  * - Linux platform development in cooperation with Nuremberg Institute of    *
00010  *   Technology Georg Simon Ohm, http//www.th-nuernberg.de                    *
00011  * - Linux 64-Bit platform supported by Fraunhofer IPA,                       *
00012  *   http://www.ipa.fraunhofer.de                                             *
00013  *****************************************************************************/
00014 
00015 #ifndef FRAMERATECOUNTER_H_
00016 #define FRAMERATECOUNTER_H_
00017 
00018 #include <iostream>
00019 #include <list>
00020 
00021 namespace optris
00022 {
00023 
00024 class Timer;
00025 
00030 class FramerateCounter
00031 {
00032 public:
00037   FramerateCounter(unsigned int queue=10);
00038 
00042   virtual ~FramerateCounter();
00043 
00047   void trigger();
00048 
00053   double getMeanValue();
00054 
00060   void print(double interval, std::ostream& stream);
00061 
00062 private:
00063 
00064   Timer* _tElapsed;
00065 
00066   Timer* _tPrint;
00067 
00068   unsigned int _queue;
00069 
00070   std::list<double> _fpsList;
00071 
00072   bool _isDirty;
00073 };
00074 
00075 }
00076 
00077 #endif /* FRAMERATECOUNTER_H_ */


optris_drivers
Author(s): Stefan May (Nuremberg Institute of Technology Georg Simon Ohm - www.th-nuernberg.de), 64-Bit platform supported by Fraunhofer IPA (www.ipa.fraunhofer.de), Support for ROS hydro migration by Christopher-Eyk Hrabia (DAI-Labor, Technische Universität Berlin)
autogenerated on Mon Oct 6 2014 03:09:39