namespace Cosmos.Core.Common { public unsafe class ProcessorInformation { /// /// Returns the Processor's vendor name /// /// CPU Vendor name public static string GetVendorName() { if (CanReadCPUID() > 0) { int[] raw = new int[3]; fixed (int* ptr = raw) FetchCPUVendor(ptr); return new string(new char[] { (char)(raw[0] >> 24), (char)((raw[0] >> 16) & 0xff), (char)((raw[0] >> 8) & 0xff), (char)(raw[0] & 0xff), (char)(raw[1] >> 24), (char)((raw[1] >> 16) & 0xff), (char)((raw[1] >> 8) & 0xff), (char)(raw[1] & 0xff), (char)(raw[2] >> 24), (char)((raw[2] >> 16) & 0xff), (char)((raw[2] >> 8) & 0xff), (char)(raw[2] & 0xff), }); } else return "\0"; } internal static int CanReadCPUID() => 0; //plugged internal static void FetchCPUVendor(int* target) { } //plugged /// /// Returns the number of CPU cycles since startup of the current CPU core /// /// Number of CPU cycles since startup public static long GetCycleCount() => 0; //plugged /// /// Returns the number of CPU cycles per seconds /// /// Number of CPU cycles per seconds public static long GetCycleRate() => 0; //plugged } }