001//
002// This file is auto-generated. Please don't modify it!
003//
004package org.opencv.core;
005
006
007
008// C++: class TickMeter
009/**
010 * a Class to measure passing time.
011 *
012 * The class computes passing time by counting the number of ticks per second. That is, the following code computes the
013 * execution time in seconds:
014 * SNIPPET: snippets/core_various.cpp TickMeter_total
015 *
016 * It is also possible to compute the average time over multiple runs:
017 * SNIPPET: snippets/core_various.cpp TickMeter_average
018 *
019 * SEE: getTickCount, getTickFrequency
020 */
021public class TickMeter {
022
023    protected final long nativeObj;
024    protected TickMeter(long addr) { nativeObj = addr; }
025
026    public long getNativeObjAddr() { return nativeObj; }
027
028    // internal usage only
029    public static TickMeter __fromPtr__(long addr) { return new TickMeter(addr); }
030
031    //
032    // C++:   cv::TickMeter::TickMeter()
033    //
034
035    public TickMeter() {
036        nativeObj = TickMeter_0();
037    }
038
039
040    //
041    // C++:  void cv::TickMeter::start()
042    //
043
044    public void start() {
045        start_0(nativeObj);
046    }
047
048
049    //
050    // C++:  void cv::TickMeter::stop()
051    //
052
053    public void stop() {
054        stop_0(nativeObj);
055    }
056
057
058    //
059    // C++:  int64 cv::TickMeter::getTimeTicks()
060    //
061
062    public long getTimeTicks() {
063        return getTimeTicks_0(nativeObj);
064    }
065
066
067    //
068    // C++:  double cv::TickMeter::getTimeMicro()
069    //
070
071    public double getTimeMicro() {
072        return getTimeMicro_0(nativeObj);
073    }
074
075
076    //
077    // C++:  double cv::TickMeter::getTimeMilli()
078    //
079
080    public double getTimeMilli() {
081        return getTimeMilli_0(nativeObj);
082    }
083
084
085    //
086    // C++:  double cv::TickMeter::getTimeSec()
087    //
088
089    public double getTimeSec() {
090        return getTimeSec_0(nativeObj);
091    }
092
093
094    //
095    // C++:  int64 cv::TickMeter::getCounter()
096    //
097
098    public long getCounter() {
099        return getCounter_0(nativeObj);
100    }
101
102
103    //
104    // C++:  double cv::TickMeter::getFPS()
105    //
106
107    public double getFPS() {
108        return getFPS_0(nativeObj);
109    }
110
111
112    //
113    // C++:  double cv::TickMeter::getAvgTimeSec()
114    //
115
116    public double getAvgTimeSec() {
117        return getAvgTimeSec_0(nativeObj);
118    }
119
120
121    //
122    // C++:  double cv::TickMeter::getAvgTimeMilli()
123    //
124
125    public double getAvgTimeMilli() {
126        return getAvgTimeMilli_0(nativeObj);
127    }
128
129
130    //
131    // C++:  void cv::TickMeter::reset()
132    //
133
134    public void reset() {
135        reset_0(nativeObj);
136    }
137
138
139    @Override
140    protected void finalize() throws Throwable {
141        delete(nativeObj);
142    }
143
144
145
146    // C++:   cv::TickMeter::TickMeter()
147    private static native long TickMeter_0();
148
149    // C++:  void cv::TickMeter::start()
150    private static native void start_0(long nativeObj);
151
152    // C++:  void cv::TickMeter::stop()
153    private static native void stop_0(long nativeObj);
154
155    // C++:  int64 cv::TickMeter::getTimeTicks()
156    private static native long getTimeTicks_0(long nativeObj);
157
158    // C++:  double cv::TickMeter::getTimeMicro()
159    private static native double getTimeMicro_0(long nativeObj);
160
161    // C++:  double cv::TickMeter::getTimeMilli()
162    private static native double getTimeMilli_0(long nativeObj);
163
164    // C++:  double cv::TickMeter::getTimeSec()
165    private static native double getTimeSec_0(long nativeObj);
166
167    // C++:  int64 cv::TickMeter::getCounter()
168    private static native long getCounter_0(long nativeObj);
169
170    // C++:  double cv::TickMeter::getFPS()
171    private static native double getFPS_0(long nativeObj);
172
173    // C++:  double cv::TickMeter::getAvgTimeSec()
174    private static native double getAvgTimeSec_0(long nativeObj);
175
176    // C++:  double cv::TickMeter::getAvgTimeMilli()
177    private static native double getAvgTimeMilli_0(long nativeObj);
178
179    // C++:  void cv::TickMeter::reset()
180    private static native void reset_0(long nativeObj);
181
182    // native support for java finalize()
183    private static native void delete(long nativeObj);
184
185}