You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
565 B

// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (c) 2016 Cyril Hrubis <chrubis@suse.cz>
*/
/*
* Test for expiration timer the test should run for roughly 5 seconds
* when executed as time ./tst_expiration_timer
*/
#include "tst_test.h"
#include "tst_timer.h"
static void do_test(void)
{
tst_timer_start(CLOCK_MONOTONIC);
while (!tst_timer_expired_ms(5000))
usleep(1);
tst_res(TPASS, "All done!");
}
static void setup(void)
{
tst_timer_check(CLOCK_MONOTONIC);
}
static struct tst_test test = {
.setup = setup,
.test_all = do_test,
};