Problem with TimerCallback in.NET Compact Framework

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi all,
>
> I'm developing a PocketPC application using .NET CF.
> In my application, I want to use timer callback ,so that after a specified
> time interval I'm able to do some logging operation continuously.
>
> I've implemented this and the build is also successful.
> However, I observe the following:
>
> When my application alone running it seems to log the details perfectly
> on
> to the specified file after a duration of 10 seconds as specified in the
> callback function argument .
>
> When I try to open another application at the same time, however logging
> into the file stops and the timer no longer seems to be working.
>
> I'm using a PDA with PocketPC2002 with PXA250 processor.
> Can some please help?
>
> Why is the timercallback not getting executed when I open any other
> file/application?
>
> NOTE: I'm not even trying to open the same file in which logging is
> happening.
>
> Any help is appreciated.
>
> Thanks.

Below is the code I'm using to create the timer:
TimerCallback timerCollectDelegate =
new TimerCallback(charge.ChargeStatus);
System.Threading.Timer CollectTimer =
new System.Threading.Timer(timerCollectDelegate,
null, 0,
2000);


.



Relevant Pages

  • using QueryPerformanceCounter in a logger class?
    ... simple timer with high performance counters "QueryPerformanceCounter" ... applications have logging turned off? ... Should logging paint routines be turned off in production code? ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Timed event - problem
    ... is the timer callback in a different thread than the main prog ... equivalent to using a polling loop and defeats the purpose of using a timer. ... And can a timer callback be called while we are still in a different timer ... I believe a timer callback function is just a function. ...
    (comp.unix.programmer)
  • Re: Thread Pooling when using SoapService & SoapClient
    ... > coming from the message receive timeout engine which is not transport ... > is creating and destroying a thread to handle the timer callback. ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Problems using System.Threading.Timer
    ... two Timer objects which control uptime of my apps. ... notify my apps to suspend and one is used to notify them to resume. ... The timer callback was invoked as expected... ...
    (microsoft.public.dotnet.csharp.general)
  • Re: System.Threading.Timer is intermittently late
    ... I'll try destroying and re-creating a new timer - thanks for the idea. ... logging to the database, so it is conceivable that I am blocking there. ... SQL Server Express is also running on that server. ...
    (microsoft.public.dotnet.framework)