LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 11-02-2017, 10:19 AM   #1
vinothk91
LQ Newbie
 
Registered: May 2013
Location: Chennai,India
Posts: 5

Rep: Reputation: Disabled
How the setitimer in linux is working in low leve ? What is the maximum timeout we can give to it ?


How the setitimer in linux is working in low level ? . I know its usages . What is the maximum timeout we can give to it ? . Will it respond to the system time (which we can set by date command) . For example : I give the timeout as 18 hours to setitimer , and increase the system time by 18 hours using date command , will it expire immediately ?
 
Old 11-03-2017, 04:19 PM   #2
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 8,706
Blog Entries: 4

Rep: Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030
While a timer could certainly be set for "many thousands of seconds from now," that would IMHO not be a very good use for this facility. If you need long-term scheduling, use a facility such as cron, its many more-clever replacements, or the facilities built-in to systemd.

If you abruptly change the system's current-time, then obviously this would trigger a helluva lot of timeouts ... but, once again, this is really not a prudent thing to do to any system.

Interval timers are usually used to implement "polling" facilities that might go off, say, once a minute. They might also be used for "watchdog" timers, designed to allow a facility to realize that it might be stalled. The scenarios that you describe are really not within the scope of their intended uses.
 
  


Reply

Tags
kernel


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
[SOLVED] maximum resolution too low with AMD catalyst drivers jason41987 Linux - Hardware 8 11-24-2013 11:47 PM
Use several timers with setitimer() webquinty Linux - Newbie 1 04-02-2010 11:34 PM
LXer: How to give your low-end Canon digital camera RAW support LXer Syndicated Linux News 0 09-10-2007 05:30 PM
Lynksys router, no DHCP. Have to use IP manualy, some one give me low down. RHLinuxGUY Linux - Networking 1 07-08-2004 03:16 AM
about setitimer dummyagain Programming 8 10-03-2003 04:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 02:35 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