Skip to content

Commit a315279

Browse files
authored
Create stopwatch.snippet
1 parent 9013620 commit a315279

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

Helpers/stopwatch.snippet

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
3+
<CodeSnippet Format="1.0.0">
4+
<Header>
5+
<Title>stopwatch</Title>
6+
<Shortcut>stopwatch</Shortcut>
7+
<Description>Code snippet for StopWatch timer</Description>
8+
<Author>unitycoder.com</Author>
9+
</Header>
10+
<Snippet>
11+
<Declarations>
12+
<Literal Editable="false"></Literal>
13+
</Declarations>
14+
<Code Language="csharp"><![CDATA[var stopwatch = new System.Diagnostics.Stopwatch();
15+
stopwatch.Start();
16+
17+
$end$
18+
19+
stopwatch.Stop();
20+
Debug.LogFormat("Timer: {0} ms", stopwatch.ElapsedMilliseconds);
21+
stopwatch.Reset();
22+
]]></Code>
23+
</Snippet>
24+
</CodeSnippet>
25+
</CodeSnippets>

0 commit comments

Comments
 (0)