using System.Timers;
namespace _2024._03._11
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        System.Timers.Timer Timer;

        private void TimeText_TextChanged(object sender, EventArgs e)
        {
            Timer = new System.Timers.Timer();
            Timer.Interval = 1000;
            Timer.Elapsed += StartBtn_Click;
        }

        private void StartBtn_Click(object sender, EventArgs e)
        {
            Timer.Enabled = true;
            StartBtn.Enabled = false;
            label1.Text = "{0:HH:mm:ss.fff}";
        }

        private void StopBtn_Click(object sender, EventArgs e)
        {
            Timer.Enabled = false;
            StartBtn.Enabled = true;
        }
    }
}