[Mono-bugs] [Bug 661137] New: System.Timers.Timer.Elapsed with ElapsedEventHandler did not kick in after assigned interval

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Dec 22 20:48:41 EST 2010


https://bugzilla.novell.com/show_bug.cgi?id=661137

https://bugzilla.novell.com/show_bug.cgi?id=661137#c0


           Summary: System.Timers.Timer.Elapsed with ElapsedEventHandler
                    did not kick in after assigned interval
    Classification: Mono
           Product: Mono: Compilers
           Version: 2.8.x
          Platform: i386
        OS/Version: Windows XP
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: C#
        AssignedTo: msafar at novell.com
        ReportedBy: Tommi.Chui at spirentcom.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Community User
           Blocker: Yes


Description of Problem:
Using Mono 2.8.1 with C#, I added a ElapsedEventHandler in Timer.Elapsed, start
timer, event didn't start at assigned time interval. Attached the tested code.

Steps to reproduce the problem:
------------------------------------
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Timers;

namespace SystemTimer
{
    class Program
    {
        static void Main(string[] args)
        {
            System.Timers.Timer hi = new System.Timers.Timer();
            hi.Elapsed += new System.Timers.ElapsedEventHandler(hi_Elapsed);
            hi.Interval = 600 * 1000;
            hi.Start();
            Thread.Sleep(650000);

        }

        static void hi_Elapsed(object source, ElapsedEventArgs e) 
        {
            Console.WriteLine("elapsed");
        }
    }
}


Actual Results:
nothing print out

Expected Results:
print "elapsed" on the screen

How often does this happen? 
Everytime

Additional Information:

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list