- Create DateTime dtStart = DateTime.Now;
- Call the function you want to test.
- After calling function write DateTime dtEnd = DateTime.Now;
- Now create TimeSpan object to know the difference between starting time and ending time.
Example:
DateTime dtStart = DateTime.Now;
functionName(params);
DateTime dtEnd = DateTime.Now;
TimeSpan ts = dtEnd - dtStart;
No comments:
Post a Comment