axle OS
x86_32 UNIX-like hobby OS
src
std
timer.h
1
#ifndef STD_TIMER_H
2
#define STD_TIMER_H
3
4
#include "std_base.h"
5
#include <stdbool.h>
6
#include <stdint.h>
7
8
__BEGIN_DECLS
9
10
#define MAX_CALLBACKS 100
11
12
typedef
struct
{
13
void
* callback;
14
uint32_t interval;
15
uint32_t time_left;
16
bool
repeats;
17
void
* context;
18
}
timer_callback
;
19
20
STDAPI
void
sleep(uint32_t ms);
21
STDAPI
timer_callback
add_callback(
void
* callback,
int
interval,
bool
repeats,
void
* context);
22
STDAPI
void
remove_callback(
timer_callback
callback);
23
24
__END_DECLS
25
26
#endif // STD_TIMER_H
timer_callback
Definition:
timer.h:12
Generated by
1.8.14