C# how to make a clock run after reading from device
<p>I know that if we want to display the pc time, we will use the below coding:</p>

<pre><code>   System.Windows.Forms.Timer tmr = null;
    private void StartTimer()
    {
        tmr = new System.Windows.Forms.Timer();
        tmr.Interval = 1000;
        tmr.Tick += new EventHandler(tmr_Tick);
        tmr.Enabled = true;
    }

    void tmr_Tick(object sender, EventArgs e)
    {
        textBox6.Text = DateTime.Now.ToString("dd/MM/yy HH:mm:ss");
    }

    private void Form1_Load(object sender, EventArgs e)
    {
        StartTimer();
    }
</code></pre>

<p>But I do not want to display the pc time. I want to display another time (the rtc time from microcontroller for my case).</p>

<p>If I get the rtc time from serial port and displayed into the text box as "09:00:00". It is just static there right? How do I get it to run/increment on the text box?</p>

<p>I've tried the below which I modified from above coding:</p>

<pre><code>    System.Windows.Forms.Timer rtc = null;
    private void StartRTC()
    {
        rtc = new System.Windows.Forms.Timer();
        rtc.Interval = 1000;
        rtc.Tick += new EventHandler(rtc_Tick);
        rtc.Enabled = true;
    }
    int i = 1;
    DateTime dt = new DateTime();
    void rtc_Tick(object sender, EventArgs e)
    {
        textBox17.Text = dt.AddSeconds(i).ToString("HH:mm:ss");
        i++;
    }
</code></pre>

<p>But the time showed on my text box always start increment on 00:00:00.</p>

<p>How do I let it to start increment on the time I get from my microcontroller rtc?</p>
