Skip to content

Latest commit

 

History

History
44 lines (28 loc) · 1.53 KB

README.md

File metadata and controls

44 lines (28 loc) · 1.53 KB

NuGet Actions Platform

PresentMonFps

The PresentMon .NET Wrapper for calculating FPS.

Installation

Nugethttps://www.nuget.org/packages/PresentMonFps

Demo

// Check Available.
if (!FpsInspector.IsAvailable)
{
    Console.WriteLine("This library is only available on Windows.");
    return;
}

// Simple method to get PID.
// Fullname is unnecessary.
uint pid = await FpsInspector.GetProcessIdByNameAsync("YourApp.exe");

// Calculate FPS Once.
FpsResult result = await FpsInspector.StartOnceAsync(new FpsRequest(pid));
Console.WriteLine(result);

// Calculate FPS Forever.
await FpsInspector.StartForeverAsync(new FpsRequest(pid), Console.WriteLine, null!);

See more from PresentMon.SampleWPF and PresentMon.SampleConsole.

Thanks to

Licenses

MIT