X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=geekos%2Fsrc%2Fgeekos%2Ftimer.c;h=964f50b4dd4d076980842b11d8506f1656e5e2c5;hp=e287b6e21b8d12fd86be97e58b1f55c7934712cb;hb=a1073097716c800734e117267ce7aa92aa0d9a17;hpb=819c31aa7157ed1e3e17b9f05bf74de38179233d diff --git a/geekos/src/geekos/timer.c b/geekos/src/geekos/timer.c index e287b6e..964f50b 100644 --- a/geekos/src/geekos/timer.c +++ b/geekos/src/geekos/timer.c @@ -133,11 +133,6 @@ timerEvent pendingTimerEvents[MAX_TIMER_EVENTS]; */ volatile ulong_t g_numTicks; -ulong_t clock_time(void){ - return g_numTicks; -} - - /* * Number of times the spin loop can execute during one timer tick */ @@ -173,6 +168,10 @@ int g_Quantum = DEFAULT_MAX_TICKS; # define Debug(args...) #endif +ulong_t clock_time(void){//in millisec + return g_numTicks * (1000/HZ); +} + /* ---------------------------------------------------------------------- * Private functions * ---------------------------------------------------------------------- */ @@ -359,6 +358,8 @@ int Start_Timer(int ticks, timerCallback cb, void * arg) KASSERT(!Interrupts_Enabled()); + PrintBoth ("there\n"); + if (timeEventCount == MAX_TIMER_EVENTS) { return -1; } else {