Karg
v0.2.0
The kernel of CargOS
timer.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
list.h
>
4
#include <
time.h
>
5
6
typedef
struct
{
7
list_node_t
node
;
8
9
time_t
time
;
10
void (*callback)(
void
*data);
11
void
*
data
;
12
}
timer_t
;
13
14
void
timer_init
(
timer_t
*timer);
15
void
timer_wait
(
timer_t
*timer,
time_t
ns,
void
(*callback)(
void
*data),
16
void
*data);
17
void
timer_cancel
(
timer_t
*timer);
18
void
timer_isr
(
void
);
list.h
list_node
Definition:
list.h:6
timer_t
Definition:
timer.h:6
timer_t::node
list_node_t node
Definition:
timer.h:7
timer_t::time
time_t time
Definition:
timer.h:9
timer_t::data
void * data
Definition:
timer.h:11
time.h
time_t
u64 time_t
Definition:
time.h:7
timer_init
void timer_init(timer_t *timer)
Definition:
timer.c:9
timer_cancel
void timer_cancel(timer_t *timer)
Definition:
timer.c:32
timer_wait
void timer_wait(timer_t *timer, time_t ns, void(*callback)(void *data), void *data)
Definition:
timer.c:11
timer_isr
void timer_isr(void)
Definition:
timer.c:43
include
timer.h
Generated by
1.9.1