dotnet-Snippets.com
Snippets: 73 | Registered User: 84 | Visitors online: 35
Main Menu

Home
Random Snippet
FAQs
Contact Us
Imprint
RSS Feeds

Rss All languages
Rss C#
Rss VB.NET
Rss C++
Rss J#
Rss ASP.NET
Jobs

dotnet Jobs
Google Ads

Sri Lanka .NET 
                Forum Member
Get the CPU speed in Mhz

Author: Jan Welker
Programming Language: C# Rating:
not yet rated

Views: 6353

Description:

Get the CPU speed in Mhz



C#
1
2
3
4
5
6
7
8
9
10
11
// ad a reference to System.Management !
using System.Management;

public uint CPUSpeed()
{
  ManagementObject Mo = new ManagementObject("Win32_Processor.DeviceID='CPU0'");
  uint sp = (uint)(Mo["CurrentClockSpeed"]);
  Mo.Dispose();
  return sp;
}


This Snippets could be interesting for you:
No results available

Poor Excellent
1 2 3 4 5 6 7 8 9 10
Sign in to vote for this snippet.

Comments:
(Please log in to write an comment.)