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: Daniel Stenberg (daniel_at_haxx.se)
Date: 2003-09-23


On Tue, 23 Sep 2003, Minuk Choi wrote:

> int t = current_tick;
>
> while ((current_tick-t)<3600)
> something...
>
> it's in a file in the plugin directory. When I try to compile, I get the
> message that current_tick is an undefined reference. Am I forgetting
> something?

Yes, when you're writing a plugin you don't have access to the "normal"
globals in Rockbox. You need to access them through the plugin struct.

AFAICT, there's a "current_tick" pointer in that struct that probably points
to the actual current_tick value.

Something similar to this might work:

  int t = *rb->current_tick

  while ((*rb->current_tick-t)<3600)
     something...

-- 
 Daniel Stenberg -- http://rockbox.haxx.se/ -- http://daniel.haxx.se/



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