Mercurial > lcfOS
annotate cos/kernel/timer.c @ 206:6c6bf8890d8a
Added push and pop encodings
author | Windel Bouwman |
---|---|
date | Fri, 28 Jun 2013 16:49:38 +0200 |
parents | 8012221dd740 |
children |
rev | line source |
---|---|
24 | 1 #include "kernel.h" |
2 | |
3 static uint64_t ticks = 0; | |
4 | |
5 void timerDriverUpdate() | |
6 { | |
28 | 7 ticks++; |
8 task_scheduler(); | |
24 | 9 } |
10 | |
11 uint64_t getTimeMS() | |
12 { | |
13 return 55*ticks; | |
14 } | |
15 | |
34
8012221dd740
Fixes for uninitialized data. This causes problems on real machines
windel
parents:
28
diff
changeset
|
16 void timer_init() |
8012221dd740
Fixes for uninitialized data. This causes problems on real machines
windel
parents:
28
diff
changeset
|
17 { |
8012221dd740
Fixes for uninitialized data. This causes problems on real machines
windel
parents:
28
diff
changeset
|
18 ticks = 0; |
8012221dd740
Fixes for uninitialized data. This causes problems on real machines
windel
parents:
28
diff
changeset
|
19 } |
8012221dd740
Fixes for uninitialized data. This causes problems on real machines
windel
parents:
28
diff
changeset
|
20 |