using System.Runtime.InteropServices;
using NvAPIWrapper.Native.Helpers;
namespace NvAPIWrapper.Native.GPU.Structures
{
///
/// Holds information about the clock frequency of an specific clock domain
///
[StructLayout(LayoutKind.Sequential, Pack = 8)]
public struct ClockDomainInfo
{
internal readonly uint _IsPresent;
internal readonly uint _Frequency;
///
/// Gets a boolean value that indicates if this clock domain is present on this GPU and with the requested clock type.
///
public bool IsPresent
{
get => _IsPresent.GetBit(0);
}
///
/// Gets the clock frequency in kHz
///
public uint Frequency
{
get => _Frequency;
}
///
public override string ToString()
{
return IsPresent ? $"{_Frequency:N0} kHz" : "N/A";
}
}
}