Q: System.Threading.Timer

  • Thread starter Thread starter Martin Arvidsson, Visual Systems AB
  • Start date Start date
M

Martin Arvidsson, Visual Systems AB

Hi!

I get a unexpected error message that i dont know why it is happening.

timeOut = NextTimerEvent(ref _NextEventTimeSendRagard, "Rågård",
FiletypeToSend.Ragard);
The code above returns 137.23:10:54.9097393, that is a date and time in
december this year.

_ftpSendRagardTimer.Change(timeOut, TimeSpan.Zero);

the _ftpSend... is a System.Threading.Timer objec.
When i issue a change i use the TimeSpan struct,
an exception occours telling me that the dueTime is expected to be less than
2^32-2??!

Call me crazy, but isn't it less than that?

What could be the error?

Regards
Martin
 
Hi!

I get a unexpected error message that i dont know why it is happening.

timeOut = NextTimerEvent(ref _NextEventTimeSendRagard, "Rågård",
FiletypeToSend.Ragard);
The code above returns 137.23:10:54.9097393, that is a date and time in
december this year.

_ftpSendRagardTimer.Change(timeOut, TimeSpan.Zero);

the _ftpSend... is a System.Threading.Timer objec.
When i issue a change i use the TimeSpan struct,
an exception occours telling me that the dueTime is expected to be less than
2^32-2??!

Call me crazy, but isn't it less than that?

What could be the error?

Could you post a short but complete program that demonstrates the
problem?
See http://pobox.com/~skeet/csharp/complete.html for what I mean by
that.

Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top