This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DateTime startTime = DateTime.Now; | |
//Code here | |
TimeSpan diff = DateTime.Now - startTime; | |
//Use methods in [diff] to get required data. | |
// e.g. the below is to get time in seconds. | |
Console.WriteLine(diff.TotalSeconds); |
Happy coding
C
No comments:
Post a Comment
Comments are moderated only for the purpose of keeping pesky spammers at bay.