https://bugzilla.novell.com/show_bug.cgi?id=418107
Summary: Timer fires too agressively
Product: Mono: Class Libraries
Version: SVN
Platform: All
OS/Version: Windows XP
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Windows.Forms
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
QAContact: [email protected]
Found By: ---
The Tick event of System.Windows.Forms.Timer apparently fires twice whenever
the interval elapses.
Note:
This only affects Windows.
To reproduce, compile and run the following code:
using System;
using System.Windows.Forms;
public class MainForm : Form
{
public MainForm ()
{
//
// _timer
//
_timer = new Timer ();
_timer.Interval = 1000 * 2; // update every 2 seconds
_timer.Tick += new EventHandler (Timer_Tick);
_timer.Start ();
}
[STAThread]
static void Main ()
{
Application.Run (new MainForm ());
}
static void Timer_Tick (object sender, EventArgs e)
{
Console.WriteLine ("TICK");
}
private Timer _timer;
}
Expected result:
one "TICK" line is written to the console every 2 seconds.
Actual result:
two "TICK" lines are written to the console every 2 seconds.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs