Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: DEV timer? GetTicks?
From: Björn Stenberg (bjorn_at_haxx.se)
Date: 2003-09-22


Minuk Choi wrote:
> Hiya, I'm playing around with the source files... and I was
> wondering... is there a way to grab the current number of ticks or
> timer?

Yes. The variable 'current_tick' is incremented HZ times per second.

> I want to write something that implements a time based (in milliseconds)
> delay.

You should use sleep(HZ/fraction) for that. Busy waiting does not work since we don't use preemptive scheduling.

-- 
Björn



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa