/*
 * $Id: attime.h,v 1.1 2003/02/07 18:15:44 wheeler Exp $
 *
 * 一定時間後に関数を発動する
 *
 * $Log: attime.h,v $
 * Revision 1.1  2003/02/07 18:15:44  wheeler
 * Fox's version of libultra and friends.
 *
 * Revision 1.2  1997/02/07  10:42:37  hayakawa
 * 時限式発動関数
 *
 * Revision 1.1  1996/12/18  01:05:55  hayakawa
 * Initial revision
 *
 *
 */

#ifndef __ATTIME_H_
#define __ATTIME_H_

#include "u64types.h"		/* rgba_t */

#ifdef __cplusplus
extern "C" {
#endif

typedef struct attime_s {
    void (*func)(void *);
    void *arg;
    OSThread *Thread;
    OSTimer   timer;		/* オプション */
} attime_t;
typedef attime_t Attime;

void attime_cleanup(Attime *this);
void attime_init(Attime *this);
void attime_SetTimer(Attime *this, OSTime countdown, OSTime interval);
void attime_entry_func(Attime *this, void (*func)(void *), void *arg);
void attime_CreateThread(Attime *this, OSThread *t, OSId id, void (*entry)(void *), void *arg, void *sp, OSPri pri);
void attimeproc_init(void);

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif /* __ATTIME_H_ */
