LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-28-2010, 08:56 AM   #1
KillerCode
Member
 
Registered: Nov 2010
Posts: 57

Rep: Reputation: 0
Windows Like Timer?


i tried googling for anytimer that works the same way as windows SetTimer API call, but couldnt find any
i found this one http://cc.byexamples.com/2007/03/14/create-a-timer/ but its blocking, have to check the timer state everytime

is there anything like SetTimer Windows API under linux?
precision doesnt really matter, im gonna make it check for single state every like 10 seconds
 
Old 11-29-2010, 06:06 PM   #2
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: Slackware
Posts: 8,366

Rep: Reputation: 3416Reputation: 3416Reputation: 3416Reputation: 3416Reputation: 3416Reputation: 3416Reputation: 3416Reputation: 3416Reputation: 3416Reputation: 3416Reputation: 3416
In what language, and which APIs are your program using?

This is how you do it with glibc:

http://www.gnu.org/software/libc/man...tting-an-Alarm

If you're using something like SDL or Qt, then you have access to a higher-level timer:

Last edited by dugan; 11-29-2010 at 06:13 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I get LAPIC timer to run instead of the PIT timer? sixerjman Linux - Kernel 1 10-16-2007 09:59 PM
set a timer in c++ for windows mohtasham1983 Programming 8 05-02-2007 08:18 PM
C timer ieatsplaydoh Programming 12 05-02-2007 06:36 PM
Still need help with timer davidguygc Programming 1 04-25-2007 08:50 PM
Multimedia timer (SMP friendly timer) bigqueso Linux - Kernel 0 03-15-2007 03:49 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration