2020-08-15 11:21:31 -03:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2020, the SerenityOS developers.
|
|
|
|
|
*
|
2021-04-22 05:24:48 -03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-08-15 11:21:31 -03:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <LibCore/EventLoop.h>
|
|
|
|
|
#include <LibCore/Timer.h>
|
2021-03-12 13:29:37 -03:00
|
|
|
#include <unistd.h>
|
2020-08-15 11:21:31 -03:00
|
|
|
|
|
|
|
|
int main(int, char**)
|
|
|
|
|
{
|
|
|
|
|
Core::EventLoop event_loop;
|
|
|
|
|
|
|
|
|
|
auto timer = Core::Timer::construct(10, [&] {
|
2021-01-09 11:09:40 -03:00
|
|
|
dbgln("Now hanging!");
|
2020-08-15 11:21:31 -03:00
|
|
|
while (true) {
|
|
|
|
|
sleep(1);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return event_loop.exec();
|
|
|
|
|
}
|