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