/* This class is intended to be used in a loop as a simple method of limiting the loop to * a certain number of iterations per second. Usually, that would be video at 30 frames per * second. * * while( true ) { * rate_limiter lim(0.033); * // grab a frame of video and process it * } */ #include #include #include class rate_limiter { public: rate_limiter( float secs ); ~rate_limiter(); private: boost::xtime xt; float m_secs; };