Hello,

 

I am currently straightening out lib-mips/time.c to make its granularity defined by CFG_HZ (=1000) instead of the processor’s frequency at which MIPS counters normally run.

 

Can somebody explain me what the difference between get_timer and get_ticks is? Get_timer returns the current value of the timer in 1/CFG_HZ units, as I would expect. I would expect get_ticks to return the raw counter value, but that value would useless because there’s no way to tell what speed it’s running at: get_tbclk is returning CFG_HZ and not the actual counter incremental frequency. In common/main.c get_ticks is used in conjuction with get_tbclk as if it were get_timer. This indicates either get_tbclk should be returning the actual counter incremental frequency, or get_ticks to return the same value as get_timer(0).

 

I have looked at the PPC implementation, but that wasn’t of much help because there a hardware time base is used so that solution always correct.

 

Thanks in advance!

 

With kind regards,

 

            Robert.