Files
Timer/main.cpp
2024-01-23 16:27:37 +08:00

23 lines
485 B
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#include <iostream>
#include <Timer.h>
int main() {
{
ling::Timer timer([]() {
std::cout << "Hello World" << std::endl;
});
timer.start(5);
getchar();
std::cout << "停止" << std::endl;
timer.stop();
getchar();
std::cout << "重新启动" << std::endl;
timer.start();
getchar();
}
std::cout << "释放" << std::endl;
getchar();
ling::Timer::stopAll();
return 0;
}