MCPcopy Create free account
hub / github.com/RustCV/RustCV / TickMeter

Class TickMeter

rustcv/src/core/tick_meter.rs:5–9  ·  view source on GitHub ↗

复刻 OpenCV C++ 的 cv::TickMeter 类 这是一个高精度的秒表,专门用于计算 FPS 和耗时

Source from the content-addressed store, hash-verified

3/// 复刻 OpenCV C++ 的 cv::TickMeter 类
4/// 这是一个高精度的秒表,专门用于计算 FPS 和耗时
5pub struct TickMeter {
6 start_time: Option<Instant>, // 按下秒表的时刻
7 total_time: Duration, // 累计走过的时间
8 counter: u64, // 计次(比如统计了多少帧)
9}
10
11impl Default for TickMeter {
12 fn default() -> Self {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected