tu_timer.h
来自「一个开源的嵌入式flash播放器 具体看文档和例子就可」· C头文件 代码 · 共 45 行
H
45 行
// tu_timer.h -- by Thatcher Ulrich <tu@tulrich.com>// This source code has been donated to the Public Domain. Do// whatever you want with it.// Utility/profiling timer.#ifndef TU_TIMER_H#include "base/tu_types.h"namespace tu_timer{ // General-purpose wall-clock timer. May not be hi-res enough // for profiling. uint64 get_ticks(); double ticks_to_seconds(uint64 ticks); // Hi-res timer for CPU profiling. // Return a hi-res timer value. Time 0 is arbitrary, so // generally you want to call this at the start and end of an // operation, and pass the difference to // profile_ticks_to_seconds() to find out how long the // operation took. uint64 get_profile_ticks(); // Convert a hi-res ticks value into seconds. double profile_ticks_to_seconds(uint64 profile_ticks);};#endif // TU_TIMER_H// Local Variables:// mode: C++// c-basic-offset: 8 // tab-width: 8// indent-tabs-mode: t// End:
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?