ATimer#
Async timer.
Header: | #include <AUI/Common/ATimer.h> |
CMake: | aui_link(my_target PUBLIC aui::core) |
Examples#
examples/app/game_of_life/src/main.cpp
Game of Life - Game of Life implementation that uses advanced large dynamic data rendering techniques such as ITexture, AImage to be GPU friendly. The computation is performed in AThreadPool.
examples/7guis/timer/src/main.cpp
7GUIs Timer - Timer example.
mTimer->start();
}
private:
_<ATimer> mTimer = _new<ATimer>(100ms);
high_resolution_clock::time_point mStartTime = high_resolution_clock::now();
AProperty<high_resolution_clock::time_point> mCurrentTime;
AProperty<high_resolution_clock::duration> mDuration = 30s;
APropertyPrecomputed<high_resolution_clock::duration> mElapsedTime = [&] {