projects
/
bootcensus
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
backported malloc fixes from 256boss, plus the addition of calloc and
[bootcensus]
/
src
/
timer.h
diff --git
a/src/timer.h
b/src/timer.h
index
86de220
..
b71e62f
100644
(file)
--- a/
src/timer.h
+++ b/
src/timer.h
@@
-18,7
+18,10
@@
along with this program. If not, see <https://www.gnu.org/licenses/>.
#ifndef _TIMER_H_
#define _TIMER_H_
#ifndef _TIMER_H_
#define _TIMER_H_
-unsigned long nticks;
+#define MSEC_TO_TICKS(ms) ((ms) * TICK_FREQ_HZ / 1000)
+#define TICKS_TO_MSEC(tk) ((tk) * 1000 / TICK_FREQ_HZ)
+
+volatile unsigned long nticks;
void init_timer(void);
void init_timer(void);