-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstopwatch.snippet
More file actions
29 lines (29 loc) · 1 KB
/
stopwatch.snippet
File metadata and controls
29 lines (29 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2010/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>処理時間を計測するコード</Title>
<Description>Stopwatch によって処理時間を計測するコードを作成します。</Description>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
<Shortcut>stopwatch</Shortcut>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>contents</ID>
<ToolTip>計測する処理</ToolTip>
<Default>// TODO : Contents</Default>
</Literal>
</Declarations>
<Code Language="csharp" Kind="method body">
<![CDATA[var stopwatch = new Stopwatch();
stopwatch.Start();
$contents$
stopwatch.Stop();
var ms = stopwatch.ElapsedMilliseconds;]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>