Hi all,

I wrote a C# .Net service to automatically do some process in each 10 seconds. Say I start the service at 10:10:10 hours, then process are executed at 10:10:10, 10:10:20, 10:10:30 ......and so on until I stop the service.

But I want to start the service at 10 seconds interval. That is either on 00, 10, 20, 30... seconds time. Not like 11, 34, 56....

In other words, even I start the service manually at anytime my processing should start like times on 10:20:00, 2:45:30, 11:19:50, etc

I think it is clear for you now.

All the things I start from the constructor method. May following code segment helps you...

Code:
namespace RfService
{
	public class RfService : System.ServiceProcess.ServiceBase
	{
		public RfService()
		{
			InitializeComponent();

			const double INTERVAL = 10000;	
			TimerTicker = new System.Timers.Timer( INTERVAL );
			TimerTicker.Elapsed += new ElapsedEventHandler( this.ServiceTimer_Tick );
		}

		private void ServiceTimer_Tick( object sender, System.Timers.ElapsedEventArgs e )
		{
                        // Do the processing here
		}
        }
}
Can you guys and gals give me a help to do it.