Oswaldo said;
> Tanks John, but AlmSetAlarm works in seconds, i need more precision, 
> preferably miliseconds.
Oswaldo,
Sorry, but you didn't say you needed it that accurate.
You'll have to do it in your event loop, instead of using EvtGetEvent() with 
waitforever.
You can call it with a timeout in ticks, it will generate a nilEvent if there 
are no other events to despatch.
Respond to the nilEvent by calling TimGetTicks, and comparing it to the last 
time you were called with a nilEvent.
The smaller the number you set in the timeout in EvtGetEvent the more accurate 
you can do timings, but remember, the more you get called with nilEvents using 
this method, the more battery power you use up, so set it to the largest value 
that can still give you the accuracy you need.
That's how we do it with animation in one of our projects.
Hope that makes sense.
Cheers
John

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Oswaldo Hernández
Sent: 16 November 2006 12:58
To: Palm Developer Forum
Subject: Re: Timer

John Sutton escribió:
> Oswaldo,
> Read up on the alarm manager, the function you'll want is AlmSetAlarm 
> Regards John
> 

Tanks John, but AlmSetAlarm works in seconds, i need more precision, preferably 
miliseconds.



> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Oswaldo 
> Hernández
> Sent: 16 November 2006 11:09
> To: Palm Developer Forum
> Subject: Timer
> 
> Hello,
> 
> I'm searching for a timer function and i don't find it.
> 
> I need a simple function that register a timer and, when the time expire, 
> send and event or execute a callback.
> 
> Exists it? or, may i create my own timer function using the main loop?
> 

--
*****************************************
Oswaldo Hernández
oswaldo (@) soft-com (.) es
*****************************************

--
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to