2020-01-18 08:38:21 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
*
|
2021-04-22 08:24:48 +00:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 08:38:21 +00:00
|
|
|
*/
|
|
|
|
|
2020-02-06 14:04:03 +00:00
|
|
|
#include <LibCore/EventLoop.h>
|
|
|
|
#include <LibCore/Timer.h>
|
2019-07-25 11:50:39 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
int main(int, char**)
|
|
|
|
{
|
2020-02-02 11:34:39 +00:00
|
|
|
Core::EventLoop event_loop;
|
2019-07-25 11:50:39 +00:00
|
|
|
|
2020-02-02 11:34:39 +00:00
|
|
|
auto timer = Core::Timer::construct(100, [&] {
|
2021-01-09 17:51:44 +00:00
|
|
|
dbgln("Timer fired, good-bye! :^)");
|
2019-07-25 11:50:39 +00:00
|
|
|
event_loop.quit(0);
|
|
|
|
});
|
|
|
|
|
|
|
|
return event_loop.exec();
|
|
|
|
}
|