Measuring time

R

Ramona van Riet

In Delphi, I would use timeGetTime to measure the time something takes.
But how can I do that in C#?
 
R

Ramona van Riet

Vadym said:
.NET provides class TimeSpan

DateTime EventTime1 = DateTime.Now;
//some event
DateTime EventTime2 = DateTime.Now;

TimeSpan Elapsed = EventTime1 - EventTime2;

Thank you Vadym, that looks exactly like what I wanted.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top