Well, you are missing quite a bit of code; and you really haven't said what your problem is so it makes it kind of hard for anyone to help you out- with the exception of those who have ESP and can read your mind.
And do you really want a timer, which is used to raise events after a specified interval; or are you looking for a stopwatch
, which is used to time events?
Regardless, I do see a problem:
string timer = int.Parse(timer);
is undefined, you are parsing is as an INT, and then putting that into a string. Seems a little sloppy.
Next thing I noticed is a stack of
statements; depending on how these are being used you may be better off with a
Research material for you to read and then redefine your question
Timer Class (System.Windows.Forms) | Microsoft Docs
Stopwatch Class (System.Diagnostics) | Microsoft Docs