libzypp  10.5.0
Measure.h
Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00012 #ifndef ZYPP_BASE_MEASURE_H
00013 #define ZYPP_BASE_MEASURE_H
00014 
00015 #include <iosfwd>
00016 #include <string>
00017 
00018 #include "zypp/base/PtrTypes.h"
00019 
00021 namespace zypp
00022 { 
00023 
00024   namespace debug
00025   { 
00026 
00028     //
00029     //  CLASS NAME : Measure
00030     //
00068     class Measure
00069     {
00070     public:
00072       Measure();
00073 
00075       explicit
00076       Measure( const std::string & ident_r );
00077 
00079       ~Measure();
00080 
00084       void start( const std::string & ident_r = std::string() );
00085 
00087       void restart();
00088       
00092       void elapsed() const;
00093 
00095       void stop();
00096 
00097     private:
00099       class Impl;
00101       RW_pointer<Impl> _pimpl;
00102     };
00104 
00106   } // namespace debug
00109 } // namespace zypp
00111 #endif // ZYPP_BASE_MEASURE_H