Skip to content

XKaguya/PresentMonFps

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

The PresentMon .NET Wrapper for calculating FPS.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 99.6%
  • Batchfile 0.4%