tgstation-server 6.14.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
IProcessBase.cs
Go to the documentation of this file.
1using System;
2using System.Threading;
3using System.Threading.Tasks;
4
6{
10 public interface IProcessBase
11 {
15 DateTimeOffset? LaunchTime { get; }
16
20 Task<int?> Lifetime { get; }
21
25 long? MemoryUsage { get; }
26
32
37 void AdjustPriority(bool higher);
38
43
48
56 ValueTask CreateDump(string outputFile, bool minidump, CancellationToken cancellationToken);
57 }
58}
void SuspendProcess()
Suspends the process.
void ResumeProcess()
Resumes the process.
void AdjustPriority(bool higher)
Set's the owned global::System.Diagnostics.Process.PriorityClass to a non-normal value.
long? MemoryUsage
Gets the process' memory usage in bytes.
double MeasureProcessorTimeDelta()
Gets the estimated CPU usage fraction of the process based on the last time this was called.
DateTimeOffset? LaunchTime
When the process was started.
ValueTask CreateDump(string outputFile, bool minidump, CancellationToken cancellationToken)
Create a dump file of the process.
Task< int?> Lifetime
The Task<TResult> resulting in the exit code of the process or null if the process was detached.