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?

Re: DEV timer? GetTicks?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 23 Sep 2003 08:16:18 +0200 (CEST)

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/
Received on 2003-09-23

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy