Even there are lots of questions and answers about Date Time I couldn't find what I am looking for. Let me explain my problem I created a choronometer with timer(interval 10ms) as "zaman" but my progroam doesn't compiling it as fast as real time chronometer.It doens't give a relaible result(this is also a problem). Therfore I want to use Date Time function to use as a chronometer but there is a problem: I couldn't make them starts from 00:00:00.00(hh:mm:ss.ff). I wanted to do it, because by using time data Program drawing a real time data and for every measurement it must be start from zero until measurement end(elapsed time).Here is my code about by using timer(not relaible one).Can you help how can make it more accurate or how to make date.time.now starts from 00:00:00.00?
salise=miliseconds,saniye=seconds,dakika=minutes
private void zaman_Tick(object sender, EventArgs e)
{
salise = Convert.ToInt32(lblsalise.Text);
if (salise < 99)
{
lblsalise.Text = Convert.ToString(salise + 1);
}
else
{
lblsalise.Text = "00";
saniye = Convert.ToInt32(lblsaniye.Text);
if (saniye < 59)
{
lblsaniye.Text = Convert.ToString(saniye + 1);
}
else
{
lblsaniye.Text = "00";
dakika = Convert.ToInt32(lbldakika.Text);
if (dakika < 59)
{
lbldakika.Text = Convert.ToString(dakika + 1);
}
else
{
lbldakika.Text = "00";
}
}
}
lblzaman.Text = lbldakika.Text + ":" + lblsaniye.Text + ":" + lblsalise.Text;
}