annotate src/include/timer.h @ 10:42ac054c0231

*: huge refactoring dirtools now uses wchar (wayyy overdue) the timer doesn't have a stupid design anymore we don't use windows.h at all now ...
author Paper <paper@paper.us.eu.org>
date Sun, 11 Feb 2024 19:43:31 -0500
parents be4835547dd0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
1 #ifndef __timer_h
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
2 #define __timer_h
10
42ac054c0231 *: huge refactoring
Paper <paper@paper.us.eu.org>
parents: 7
diff changeset
3
42ac054c0231 *: huge refactoring
Paper <paper@paper.us.eu.org>
parents: 7
diff changeset
4 #include <windef.h>
42ac054c0231 *: huge refactoring
Paper <paper@paper.us.eu.org>
parents: 7
diff changeset
5 #include <winuser.h>
0
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
6
7
be4835547dd0 clean up code, convert git files to hg, etc.
Paper
parents: 0
diff changeset
7 struct timer {
10
42ac054c0231 *: huge refactoring
Paper <paper@paper.us.eu.org>
parents: 7
diff changeset
8 UINT_PTR id;
0
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
9 UINT interval;
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
10 TIMERPROC timer_proc;
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
11 };
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
12
10
42ac054c0231 *: huge refactoring
Paper <paper@paper.us.eu.org>
parents: 7
diff changeset
13 void timer_init(struct timer* timer, UINT interval, TIMERPROC timer_proc);
42ac054c0231 *: huge refactoring
Paper <paper@paper.us.eu.org>
parents: 7
diff changeset
14 int timer_set(struct timer* timer);
42ac054c0231 *: huge refactoring
Paper <paper@paper.us.eu.org>
parents: 7
diff changeset
15 int timer_stop(struct timer* timer);
0
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
16
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
17 #endif // __timer_h