mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-07 22:37:54 +00:00
run dotnet format
This commit is contained in:
parent
05989242f9
commit
ac2671452d
278 changed files with 1913 additions and 1808 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue