I am developing a program in LinqPad that will scrub through files and return a csv of some information I am curious about. I need to track the time it takes for certain processes to execute and was trying to use the Stopwatch method to do so.
Ultimately what I'd like to do is something similar to this:
void main()
{
T runTime = Timer(someProcess());
}
void someProcess(){...}
public static class Diagnostics
{
…
public static T Timer(???)
{
… (execute whatever we're timing)
return T timeTookToExe;
}
}