Last active
December 11, 2015 03:48
-
-
Save jonathascosta/4540519 to your computer and use it in GitHub Desktop.
Stopwatch snippet
This file contains hidden or 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
| <?xml version="1.0" encoding="utf-8"?> | |
| <CodeSnippet Format="1.0.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
| <Header> | |
| <Title>Stopwatch</Title> | |
| <Author>Jonathas Piazzarollo Costa</Author> | |
| <Shortcut>stopwatch</Shortcut> | |
| <Description>Surrounds code with Stopwatch.</Description> | |
| <SnippetTypes> | |
| <SnippetType>SurroundsWith</SnippetType> | |
| </SnippetTypes> | |
| </Header> | |
| <Snippet> | |
| <References> | |
| <Reference> | |
| <Assembly>System.Diagnostics</Assembly> | |
| </Reference> | |
| </References> | |
| <Code Language="csharp"> | |
| <![CDATA[System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch(); | |
| sw.Start(); | |
| $selected$ | |
| sw.Stop(); | |
| System.Diagnostics.Debug.WriteLine("{0} seconds", sw.Elapsed.TotalSeconds);]]> | |
| </Code> | |
| </Snippet> | |
| </CodeSnippet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment