From 5a2f1098d81ad58b309e5e558d0492643166a799 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Sat, 14 Jul 2007 00:18:48 +0200 Subject: [PATCH] Support time without timer --- cpu/microblaze/timer.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cpu/microblaze') diff --git a/cpu/microblaze/timer.c b/cpu/microblaze/timer.c index ab1cb1274..b35045344 100644 --- a/cpu/microblaze/timer.c +++ b/cpu/microblaze/timer.c @@ -33,10 +33,17 @@ void reset_timer (void) timestamp = 0; } +#ifdef CFG_TIMER_0 ulong get_timer (ulong base) { return (timestamp - base); } +#else +ulong get_timer (ulong base) +{ + return (timestamp++ - base); +} +#endif void set_timer (ulong t) { -- cgit v1.2.3