Timer application in linux

 
Thread Tools Search this Thread
Special Forums UNIX and Linux Applications Timer application in linux
# 1  
Old 12-29-2011
Question Timer application in linux

Hello everyone,
It is good to be here.
I am a newbie to Linux.Can anyone help me in designing a timer application.
The timer has to start.And after certain time interval the program should call a function continuously.It should not be in sleep mode.During the course of that time interval the program should execute the rest of the functions or statements.

Plz help me in doing so...thanx in advanceSmilieSmilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

creating an application with gui in linux

hi, so I am familiar with visual studio for windows, I was wondering if there's that kind of IDE for linux that I can use to make an application... thanks! (2 Replies)
Discussion started by: h0ujun
2 Replies

2. Shell Programming and Scripting

Linux newbie scripting help needed (timer)

Hi, Newbie to Linux needing some help with scripting, here. I've written a script that allows easily shutting down, rebooting, or exiting to terminal mode via a Dialog menu after logging out of X-server. In my .bash_profile I have startx followed by running my script, shutdownmenu.sh, and it... (1 Reply)
Discussion started by: Pop45398
1 Replies

3. UNIX and Linux Applications

Linux application upgrade ways

Hello. I need upgrade memcached. This software is installed throuth yum. In official repositories isn`t newest version of memcached, but this one is vulnerable. So looks like I need built it from source, but I dont really want to install c libraries un compilers on system. 1.) So can I compile... (0 Replies)
Discussion started by: jabalv
0 Replies

4. Programming

Application Cleanup during Linux Shutdown

I'm trying to do some cleanup (write open files) when Linux shuts down. I thought the right method would be to trap SIGTERM and do the necessary processing. Here's my sample code: #include <stdio.h> // for File I/O #include <signal.h> // for signals #include <unistd.h> // for sleep() void... (6 Replies)
Discussion started by: whatisron
6 Replies

5. Advertise with Us

Wanted- Linux Application Engineers

Optiver US LLC is a worldwide market maker and derivatives trading firm with offices in Chicago, Amsterdam and Sydney. Attracting very ambitious, talented and results-oriented individuals to become members of a highly selective trading application engineering team. This position is a primary... (0 Replies)
Discussion started by: Barb S.
0 Replies

6. AIX

Migrating C Application from AIX to Linux

Hi All, I am currently facing new problem of migrating C(c language) application from AIX machine to Linux machine. We are using GCC to compile the source code.. But facing with the compilation issues, with lot of GCC C libs differing between AIX box to Linux box... Pls help me... (3 Replies)
Discussion started by: karthikc
3 Replies

7. Linux

Socket communication and timer application

tcp communication application i have an application which run in 1) while() {in } and listens for some request When a request comes to create a file(containing some data fetch from somewhere) but i also want to start some timer that after 10/20 min delete that file But i don't know how... (0 Replies)
Discussion started by: tryit
0 Replies

8. UNIX for Dummies Questions & Answers

socket communication and timer application

i need to develop application which continuously wait for a request from multiple host and on receiving a request on that need to create a log file and after 30 mins delete that file I am new to socket programming so could anyone help me on this. How to continuously listen for a request How... (0 Replies)
Discussion started by: tryit
0 Replies

9. SCO

SCO 5.0.6 application compatibility w/ Linux?

Hello Valued Members, I was wondering if there are any Linux, BSD, versions that can run SCO 5.0.6 applications without much modification? I was looking into purchasing a copy of Caldera Openlinux, the last version, but wanted to ask if there are any other options of a newer variant. I am also... (8 Replies)
Discussion started by: stay0ut
8 Replies

10. Programming

Porting Win32 application into Linux

I need port Win32 console application, which was developed with MS Visual Studio 6.0 (without MFC using) into Linux. What is the best way to port project? Are there any standard tools or decisions? Thank you in advance, Sergey (0 Replies)
Discussion started by: Sergeyy
0 Replies
Login or Register to Ask a Question
XtAppAddTimeOut()														 XtAppAddTimeOut()

XtAppAddTimeOut - register a procedure to be called when a specified time elapses.

Synopsis
  XtIntervalId XtAppAddTimeOut(app_context, interval, proc, client_data)
	 XtAppContext app_context;
	 unsigned long interval;
	 XtTimerCallbackProc proc;
	 XtPointer client_data;

Inputs
  app_context
	    Specifies the application context in which the timer is to be set.

  interval  Specifies the time interval in milliseconds.

  proc	    Specifies the procedure that is to be called when the time expires.  See XtTimerCallbackProc(2).

  client_data
	    Specifies data to be passed to proc when it is called.

Returns
  A handle of type XtIntervalId that can be used to unregister the timeout procedure with XtRemoveTimeOut().

Description
  XtAppAddTimeOut()  registers, in application context app_context, a procedure proc, to be called by XtAppNextEvent() with client_data after
  interval milliseconds elapse.  The procedure is called once and automatically unregistered; it will not be called repeatedly every interval
  milliseconds.

  See XtTimerCallbackProc(2) for an explanation of how to write a timer callback.

Usage
  Timer  callbacks  are  automatically unregistered after they are triggered.  To have a callback called at a regular interval, call XtAppAd-
  dTimeOut() again from within the timer callback.

  A timer callback can be explicitly unregistered before it is invoked by calling XtRemoveTimeOut() with the XtIntervalId  returned  by  this
  function.

Structures
  The XtIntervalId type is defined as follows:

     typedef unsigned long XtIntervalId;

See Also
  XtAppNextEvent(1), XtRemoveTimeOut(1),
  XtTimerCallbackProc(2).

Xt - Event Handling														 XtAppAddTimeOut()