summaryrefslogtreecommitdiff
path: root/src/shared/timeout.h
blob: 0945c3318f6cd2e57c2896d7f7d1bdc48faf4bb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
 *
 *  BlueZ - Bluetooth protocol stack for Linux
 *
 *  Copyright (C) 2014  Intel Corporation. All rights reserved.
 *
 *
 */

#include <stdbool.h>

typedef bool (*timeout_func_t)(void *user_data);
typedef void (*timeout_destroy_func_t)(void *user_data);

unsigned int timeout_add(unsigned int timeout, timeout_func_t func,
			void *user_data, timeout_destroy_func_t destroy);
void timeout_remove(unsigned int id);

unsigned int timeout_add_seconds(unsigned int timeout, timeout_func_t func,
			void *user_data, timeout_destroy_func_t destroy);