Get the Start time at beginning of exam:
eg:
TimeSpan examStartTime = DateTime.Now.TimeOfDay();
When the End button is clicked, get the current time again:
eg:
TimeSpan examEndTime = DateTime.Now.TimeOfDay();
Then use TimeSpan to work out the difference by substracting the start time from the end time:
eg:
TimeSpan duration = examEndTime.Subtract(examStartTime);