Skip to content

Commit 0145f96

Browse files
committed
Always run the stopwatch.
1 parent 0988383 commit 0145f96

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

CSharpToJavaScript/CSTOJS.cs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -500,11 +500,8 @@ private void Generate(SyntaxTree tree, Assembly? assembly, CSTOJSOptions options
500500
{
501501
_IsRunning = true;
502502

503-
if (options.Debug)
504-
{
505-
_Stopwatch.Restart();
506-
Log.WriteLine("Start stopwatch", options);
507-
}
503+
_Stopwatch.Restart();
504+
Log.WriteLine("Start stopwatch", options);
508505

509506
CompilationUnitSyntax root = tree.GetCompilationUnitRoot();
510507

@@ -838,11 +835,8 @@ private void Generate(SyntaxTree tree, Assembly? assembly, CSTOJSOptions options
838835

839836
_Walker.JSSB.Append(options.AddSBAtTheBottom);
840837

841-
if (options.Debug)
842-
{
843-
_Stopwatch.Stop();
844-
Log.WriteLine($"Stop stopwatch: {_Stopwatch.Elapsed}", options);
845-
}
838+
_Stopwatch.Stop();
839+
Log.WriteLine($"Stop stopwatch: {_Stopwatch.Elapsed}", options);
846840

847841
_IsRunning = false;
848842
}

0 commit comments

Comments
 (0)