Code:
System.DateTime tm = System.DateTime.Now;
//Place this before the code you wish to test.
System.DateTime tma = System.DateTime.Now;
System.IO.StreamWriter sw = System.IO.File.AppendText("C:\\TimeTest.txt");
sw.WriteLine((((((tma.Hour * (24 * 60 * 1000)) + (tma.Minute * (60 * 1000))) + (tma.Second * 1000)) + tma.Millisecond) - ((((tm.Hour * (24 * 60 * 1000)) + (tm.Minute * (60 * 1000))) + (tm.Second * 1000)) + tm.Millisecond)));
sw.Flush();
//place this after your code