@Namespace(value="cv") @NoOffset @Properties(inherit=opencv_core.class) public class TickMeter extends Pointer
The class computes passing time by counting the number of ticks per second. That is, the following code computes the execution time in seconds: \snippet snippets/core_various.cpp TickMeter_total
It is also possible to compute the average time over multiple runs: \snippet snippets/core_various.cpp TickMeter_average
getTickCount, getTickFrequencyPointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter| Constructor and Description |
|---|
TickMeter()
the default constructor
|
TickMeter(long size)
Native array allocator.
|
TickMeter(Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getAvgTimeMilli()
returns average time in milliseconds
|
double |
getAvgTimeSec()
returns average time in seconds
|
long |
getCounter()
returns internal counter value.
|
double |
getFPS()
returns average FPS (frames per second) value.
|
double |
getLastTimeMicro()
returns passed time of the last iteration in microseconds.
|
double |
getLastTimeMilli()
returns passed time of the last iteration in milliseconds.
|
double |
getLastTimeSec()
returns passed time of the last iteration in seconds.
|
long |
getLastTimeTicks()
returns counted ticks of the last iteration.
|
TickMeter |
getPointer(long i) |
double |
getTimeMicro()
returns passed time in microseconds.
|
double |
getTimeMilli()
returns passed time in milliseconds.
|
double |
getTimeSec()
returns passed time in seconds.
|
long |
getTimeTicks()
returns counted ticks.
|
TickMeter |
position(long position) |
void |
reset()
resets internal values.
|
void |
start()
starts counting ticks.
|
void |
stop()
stops counting ticks.
|
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, trimMemory, withDeallocator, zeropublic TickMeter(Pointer p)
Pointer(Pointer).public TickMeter(long size)
Pointer.position(long).public TickMeter()
public TickMeter getPointer(long i)
getPointer in class Pointerpublic void start()
public void stop()
public double getTimeMicro()
public double getTimeMilli()
public double getTimeSec()
@Cast(value="int64") public long getLastTimeTicks()
public double getLastTimeMicro()
public double getLastTimeMilli()
public double getLastTimeSec()
public double getFPS()
public double getAvgTimeSec()
public double getAvgTimeMilli()
public void reset()
Copyright © 2026. All rights reserved.