|
OpenZGY/C++ API and Internals (ALPHA)
Access seismic data stored in ZGY format.
|
Go to the documentation of this file.
17 #include "../declspec.h"
75 long long getNativeTime();
76 long long getNativeFrequency();
79 Timer(
bool enable =
true,
const char* name = 0,
int skip = 0,
bool startrunning =
true);
82 bool getEnabled()
const {
return enabled_; }
83 double getFrequency()
const {
return static_cast<double>(frequency_); }
84 double getLast()
const {
return static_cast<double>(last_) /
static_cast<double>(frequency_); }
85 double getTotal()
const {
return static_cast<double>(total_) /
static_cast<double>(frequency_); }
86 double getOverhead()
const {
return static_cast<double>(overhead_) /
static_cast<double>(frequency_); }
87 int getCount()
const {
return laps_ < skip_ ? 0 : laps_ - skip_; }
88 const char* getName()
const {
return name_; }
89 int getSkip()
const {
return skip_ < laps_ ? skip_ : laps_; }
90 bool getRunning()
const {
return running_; }
91 int getVerbose()
const {
return verbose_; }
92 static void getValue_s(
char *buf,
int len,
const char *name,
int count,
double total,
bool running,
bool details,
bool msonly);
93 const char* getValue(
bool details =
false,
bool msonly =
false);
96 void setVerbose(
int v) { verbose_ = v; }
97 void start() {
if (enabled_) doStart(); }
98 void stop() {
if (enabled_) doStop(); }
99 void reset() {
if (enabled_) doReset(); }
115 explicit PrintingTimer(
const char *name,
int level = 1,
bool startrunning =
true);
157 double getFrequency()
const;
158 int getCount()
const;
159 double getTotal()
const;
160 double getLast()
const;
161 const char* getName()
const;
162 const char* getValue(
bool details,
bool msonly)
const;
166 void add(
int count,
double total,
double last);
167 void add(
const Timer& t);
179 virtual void print();
Hold the timing results from zero or more Timer instances.
Definition: timer.h:146
Timer that knows where to store the result.
Definition: timer.h:209
SummaryTimer that prints its result when going out of scope.
Definition: timer.h:174
Timer that prints its result when going out of scope.
Definition: timer.h:133
Definition: timer.cpp:365
Timer(bool enable=true, const char *name=0, int skip=0, bool startrunning=true)
Definition: timer.cpp:113
Implementation not visible to clients.
Timer that prints its result when going out of scope.
Definition: timer.h:111