libzypp: zypp/base/Measure.h Source File

libzypp 17.36.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
21namespace zypp
22{
24 namespace debug
25 {
26
28 //
29 // CLASS NAME : Measure
30 //
68 class ZYPP_API Measure
69 {
70 public:
72 Measure();
73
75 explicit
76 Measure(std::string ident_r );
78 Measure(std::string ident_r, std::ostream & out_r );
79
81 ~Measure();
82
86 void start(std::string ident_r = std::string() );
87
89 void restart();
90
94 void elapsed() const;
100 void elapsed( const std::string & tag_r ) const;
106 void elapsed( long tag_r ) const;
107
109 void stop();
110
111 private:
113 class Impl;
115 RW_pointer<Impl> _pimpl;
116 };
117
118
120 } // namespace debug
123} // namespace zypp
125#endif // ZYPP_BASE_MEASURE_H
zypp::debug::Measure::Impl
Measure implementation.
Definition Measure.cc:140
zypp::debug::Measure::Measure
Measure()
Default Ctor does nothing.
Definition Measure.cc:224
zypp::debug::Measure::elapsed
void elapsed() const
Print elapsed time for a running timer.
Definition Measure.cc:244
zypp::debug::Measure::stop
void stop()
Stop a running timer.
Definition Measure.cc:251
zypp::debug::Measure::restart
void restart()
re start the timer without reset-ing it.
Definition Measure.cc:241
zypp::debug::Measure::_pimpl
RW_pointer< Impl > _pimpl
Pointer to implementation.
Definition Measure.h:115
zypp::debug::Measure::start
void start(std::string ident_r=std::string())
Start timer for ident_r string.
Definition Measure.cc:238
zypp::debug
Definition Debug.h:31
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition Application.cc:20
zypp::ZYPP_API
const Arch Arch_armv7hnl Arch_armv7nhl ZYPP_API
Definition Arch.h:247
zypp::RW_pointer
Wrapper for const correct access via Smart pointer types.
Definition PtrTypes.h:293
PtrTypes.h