diff options
Diffstat (limited to 'atari/schedule.h')
-rwxr-xr-x | atari/schedule.h | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/atari/schedule.h b/atari/schedule.h index e21b759a0..05eebb2d7 100755 --- a/atari/schedule.h +++ b/atari/schedule.h @@ -17,10 +17,32 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NS_SCHEDULE_H -#define NS_SCHEDULE_H +#ifndef NS_ATARI_SCHEDULE_H +#define NS_ATARI_SCHEDULE_H -void list_schedule(void); +/** + * Process events up to current time. + * + * \return The number of miliseconds until the next scheduled event. + */ int schedule_run(void); +/** + * Schedule a callback. + * + * \param ival interval before the callback should be made in miliseconds. + * \param callback callback function. + * \param p user parameter, passed to callback function. + * \return NSERROR_OK on success or appropriate error code. + * + * The callback function will be called as soon as possible after \a ival + * ms have passed. + */ +nserror atari_schedule(int ival, void (*callback)(void *p), void *p); + +/** + * LOG all current scheduled events. + */ +void list_schedule(void); + #endif |