run dotnet format
This commit is contained in:
@@ -8,7 +8,7 @@ namespace PluralKit.Bot
|
||||
public class CpuStatService
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
|
||||
|
||||
public double LastCpuMeasure { get; private set; }
|
||||
|
||||
public CpuStatService(ILogger logger)
|
||||
@@ -23,15 +23,15 @@ namespace PluralKit.Bot
|
||||
{
|
||||
// We get the current processor time, wait 5 seconds, then compare
|
||||
// https://medium.com/@jackwild/getting-cpu-usage-in-net-core-7ef825831b8b
|
||||
|
||||
|
||||
_logger.Debug("Estimating CPU usage...");
|
||||
var stopwatch = new Stopwatch();
|
||||
|
||||
|
||||
stopwatch.Start();
|
||||
var cpuTimeBefore = Process.GetCurrentProcess().TotalProcessorTime;
|
||||
|
||||
|
||||
await Task.Delay(5000);
|
||||
|
||||
|
||||
stopwatch.Stop();
|
||||
var cpuTimeAfter = Process.GetCurrentProcess().TotalProcessorTime;
|
||||
|
||||
|
Reference in New Issue
Block a user