It depends on what program language are you using. For pure C, use Posix Timer, 
but it is a bit complex. But if use glib, there is very easy function 
g_timeout_add to achieve it, see 
http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#g-timeout-add

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of sam 
Cheng
Sent: 2009年9月29日 16:53
To: Arjan van de Ven; [email protected]
Subject: Re: [Moblin Dev] Timer in moblin

Hi
   I want a timer that every one second to run my function. How do I do?

2009/9/29 Arjan van de Ven <[email protected]>:
> sam Cheng wrote:
>>
>> Hi everyone
>>   I try to use timeline to be a time for every one second. When my
>> project is running, I try to change the system date or time. The
>> program is down. How do I do? Any other timer or function?
>>
>
> which timer do you use?
> posix provides two types of timers, one is affected by time-of-day changes,
> the other is not.
> (CLOCK_MONOTONIC vs CLOCK_REALTIME iirc)
>
> sounds like you picked the wrong one of the two;-)
>



-- 
Sam Cheng
_______________________________________________
Moblin dev Mailing List
[email protected]

To manage or unsubscribe from this mailing list visit:
http://lists.moblin.org/listinfo/dev or your user account on http://moblin.org 
once logged in.

For more information on the Moblin Developer Mailing lists visit:
http://moblin.org/community/mailing-lists
_______________________________________________
Moblin dev Mailing List
[email protected]

To manage or unsubscribe from this mailing list visit:
http://lists.moblin.org/listinfo/dev or your user account on http://moblin.org 
once logged in.

For more information on the Moblin Developer Mailing lists visit:
http://moblin.org/community/mailing-lists

Reply via email to