summaryrefslogtreecommitdiff
path: root/Userland/Utilities/misbehaving-application.cpp
blob: c72c817a9dd93e4c3ac0fb13f37d022c4388c0f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
 * Copyright (c) 2020, the SerenityOS developers.
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#include <LibCore/EventLoop.h>
#include <LibCore/Timer.h>
#include <unistd.h>

int main(int, char**)
{
    Core::EventLoop event_loop;

    auto timer = Core::Timer::construct(10, [&] {
        dbgln("Now hanging!");
        while (true) {
            sleep(1);
        }
    });

    return event_loop.exec();
}