Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

System.Timers.Timer turns app very slow and sometimes freezing

Hi there,
Since last update of Xamarin.Android the System.Timers.Timer start working very strangely. This code take at least to 5 seconds to trigger Elapsed. When it need to bre one second (The interval time).

                        Monitor = new Timer ();
            Monitor.AutoReset = true;
            Monitor.Interval = 1000;
            Monitor.Elapsed += (object sender, ElapsedEventArgs e) => {
                        //After 5 second this are fired
                RunOnUiThread (() => {
                    Time.Text = TimeElapsed.ToString ();
                        //Arround 5 loops later the UI sometimes freezes

            addTaskButton.Click += (sender, e) => {
                Monitor.Start ();

And when the Timer is running sometimes the UI freezes, making slugish expirience.

This code was working perfectly until this last update.
Curiosly, I have another app using Threads for background tasks, this Tasks takes more than usually to start (2-3 seconds aprox).
In the two cases, nothing additionally is running on UI thread.


  • Nicolas77Nicolas77 CHMember ✭✭
    edited May 2015

    I am also experiencing similar issues with System.Timers or System.Threading.Timer. Since the last update, the app sometimes freezes when using timers. Did you find something to solve your issue?

Sign In or Register to comment.