-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEndSampleCommand.cs
More file actions
33 lines (26 loc) · 893 Bytes
/
EndSampleCommand.cs
File metadata and controls
33 lines (26 loc) · 893 Bytes
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
30
31
32
33
using System.Collections.Generic;
using Rocket.API;
using Rocket.Core.Logging;
using UnityEngine.Profiling;
namespace UntProfiler
{
public class EndSampleCommand : IRocketCommand
{
public AllowedCaller AllowedCaller => AllowedCaller.Console;
public string Name => "endsample";
public string Help => "Ends the current profiling sample piece.";
public string Syntax => "/endsample";
public List<string> Aliases => new List<string> { "esample" };
public List<string> Permissions => new List<string> { };
public void Execute(IRocketPlayer caller, string[] command)
{
if (!Profiler.enabled)
{
Logger.Log("No profiling session is running.");
return;
}
Profiler.EndSample();
Logger.Log("End profiling sample.");
}
}
}