libzypp  13.10.6
Measure.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #ifndef ZYPP_BASE_MEASURE_H
13 #define ZYPP_BASE_MEASURE_H
14 
15 #include <iosfwd>
16 #include <string>
17 
18 #include "zypp/base/PtrTypes.h"
19 
21 namespace zypp
22 {
23  namespace debug
25  {
26 
28  //
29  // CLASS NAME : Measure
30  //
68  class Measure
69  {
70  public:
72  Measure();
73 
75  explicit
76  Measure( const std::string & ident_r );
77 
79  ~Measure();
80 
84  void start( const std::string & ident_r = std::string() );
85 
87  void restart();
88 
92  void elapsed() const;
93 
95  void stop();
96 
97  private:
99  class Impl;
102  };
104 
106  } // namespace debug
109 } // namespace zypp
111 #endif // ZYPP_BASE_MEASURE_H
void elapsed() const
Print elapsed time for a running timer.
Definition: Measure.cc:228
void stop()
Stop a running timer.
Definition: Measure.cc:234
RW_pointer< Impl > _pimpl
Pointer to implementation.
Definition: Measure.h:99
void restart()
re start the timer without reset-ing it.
Definition: Measure.cc:223
void start(const std::string &ident_r=std::string())
Start timer for ident_r string.
Definition: Measure.cc:217
Measure()
Default Ctor does nothing.
Definition: Measure.cc:207
Measure implementation.
Definition: Measure.cc:138
Wrapper for const correct access via Smart pointer types.
Definition: PtrTypes.h:265
Tool to measure elapsed real and process times.
Definition: Measure.h:68