473,320 Members | 1,828 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

System.Timers.Timer Exception Number must be either non-negative or -1. Parametername: dutTime

i got this exception while calling Timer.Start()

Number must be either non-negative or -1.
Parameter name: dueTime

can any one tell me the reason.
timer interval is set to 180000. and after restarting application it is
not occuring.

Regards
Shajeel

Jun 26 '06 #1
3 2512
shajeel wrote:
i got this exception while calling Timer.Start()

Number must be either non-negative or -1.
Parameter name: dueTime can any one tell me the reason.


Timer.Start() does not take any parameters. And "dueTime" is not a Timer
property, either. So clearly you are not telling the whole story of how this
timer gets initialized. Post your code or nobody can help . . .

-rick-
Jun 26 '06 #2
sorry for being late, didnt know how to set options so that i can get
mail if someone replies.

as for code, it is a bit long but it is something like this.

try
{
this.timer1.Stop();
......
log.WriteLine("Ending current session, restarting in three
minutes");
this.timer1.Start();
}
catch(Exception e)
{
log.WriteLine(e.Message);
}

i am doing this in timer.Elapsed event. and in my log file i got these
two entries

Ending current session, restarting in three minutes
Number must be either non-negative or -1.
Parameter name: dueTime

Jul 4 '06 #3
I too am having this except same problem, on code that has not been modified for nearly 6 months.

It appears that something has changed in System.Timers assembly.

Anyone got clues on this?

From http://developmentnow.com/g/36_2006_...me-dutTime.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
Mar 1 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Peter Johnsson | last post by:
How come the eventhandler for the timer's elapsed time event is called over and over again, even though the AutoReset property is set to false, if you assign a new value to the timer objects...
2
by: linesh.gajera | last post by:
Hi Guys, I am creating a Windows service that call a routine at given interval. Once routine is complete, windows service should wait for 5 minutes and then call the routine again. I was using...
5
by: Michael C# | last post by:
Hi all, I set up a System.Timers.Time in my app. The code basically just updates the screen, but since the processing performed is so CPU-intensive, I wanted to make sure it gets updated...
4
by: TheJediMessiah | last post by:
Hi, I have a number of objects for which I want to create a timer for. So for each object I would like to have a timer which runs at a different interval. For a single timer I know how to...
4
by: Ben | last post by:
Hello everybody I got confused by this problem for which I don't have a logical explanation. There is a Thread (ThreadA) which receives Events from another system thread (ThreadS). ThreadA then...
7
by: RobKinney1 | last post by:
Hello, Wow...I have one for you all and hopefully I am not understanding this timer object correctly. I have a timer setup that pulses a connection through a socket every 60 seconds. But it...
5
by: Tony Gravagno | last post by:
I have a class that instantiates two Timer objects that fire at different intervals. My class can be instantiated within a Windows Form or from a Windows Service. Actions performed by one of the...
2
by: BobAtVandy | last post by:
I'll greatly appreciate any help on this. Actually 2 questions: 1. I believe I need to use the Windows timer System.Timers.Timer . The examples I find on the web all access that timer by...
8
by: Ollie Riches | last post by:
I'm looking into a production issue related to a windows service and System.Timers.Timer. The background is the windows service uses a System.Timers.Timer to periodically poll a directory location...
5
by: Brian | last post by:
Hello all. I have a simple application that I was using to test and understand the System.Timers.Timer and noticed that when I stop the application, on occasion, it throughs the following...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.