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