NetSurf
schedule.h
Go to the documentation of this file.
1/*
2 * Copyright 2008 Vincent Sanders <vince@simtec.co.uk>
3 *
4 * This file is part of NetSurf, http://www.netsurf-browser.org/
5 *
6 * NetSurf is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * NetSurf is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef FRAMEBUFFER_SCHEDULE_H
20#define FRAMEBUFFER_SCHEDULE_H
21
22/**
23 * Schedule a callback.
24 *
25 * \param tival interval before the callback should be made in ms
26 * \param callback callback function
27 * \param p user parameter, passed to callback function
28 *
29 * The callback function will be called as soon as possible after t ms have
30 * passed.
31 */
32
33nserror framebuffer_schedule(int tival, void (*callback)(void *p), void *p);
34
35/**
36 * Process scheduled callbacks up to current time.
37 *
38 * @return The number of milliseconds untill the next scheduled event
39 * or -1 for no event.
40 */
41int schedule_run(void);
42
43void list_schedule(void);
44
45#endif
void list_schedule(void)
LOG all current scheduled events.
Definition: schedule.c:210
int schedule_run(void)
Process events up to current time.
Definition: schedule.c:137
nserror
Enumeration of error codes.
Definition: errors.h:29
nserror framebuffer_schedule(int tival, void(*callback)(void *p), void *p)
Schedule a callback.
Definition: schedule.c:95