Skin designed by Auron89.Find more great skins at Silent Designs!
Image hosted by Photobucket.com


 

 Performance Counter, QueryPerformanceCounter in .net
Risky
  Posted: Feb 2 2006, 11:26 AM


Newbie


Group: Members
Posts: 15
Member No.: 169
Joined: 8-January 06



Hi do you know of a way to get the QueryPerformanceCounter in .net with out the big API call.

CODE

Private Declare Function QueryPerformanceCounter Lib "kernel32" (lpPerformanceCount As Currency) As Long

Private Declare Function QueryPerformanceFrequency Lib "kernel32" (lpFrequency As Currency) As Long


I used to need one to get the tickcount in vb6 but not now don’t and I was just wondering if this was true with this API as well.
Top
Loffen
Posted: Feb 3 2006, 11:45 AM


n00bie administrator


Group: Admin
Posts: 146
Member No.: 82
Joined: 5-January 05



If you just want the tickcount you can use Environment.Tickcount or something similar (dont got .Net here, so cant check it for you.. shouldn't be hard to find.)

Otherwise, you do have a namespace to handle all diffrent kinds of performance counters... (CPU load, mem usage, etc... ) dont know what its called anymore though. I can check this when i get home later today.. just wait a couple of hours tongue.gif

Hope that helps,
-- Loffen
Top
Risky
  Posted: Feb 7 2006, 10:25 PM


Newbie


Group: Members
Posts: 15
Member No.: 169
Joined: 8-January 06



No no no sorry i know how to get the tickcount useing Environment.Tickcount but back in vb 6 u needed to put
CODE


 Private Declare Function timeGetTime Lib "winmm.dll" () As Long



was just wondering if i needed the big a api for Performance Counter now in .net or if they have a new way to do it.

i see lots of counters n junk but i cant find the Performance Counter so at the mo im still using

CODE

Private Declare Function QueryPerformanceCounter Lib "kernel32" (lpPerformanceCount As Currency) As Long

Private Declare Function QueryPerformanceFrequency Lib "kernel32" (lpFrequency As Currency) As Long



So all i need to know is if there is a new way to get the performance counter.
Top


Topic Options Quick Reply




Hosted for free by InvisionFree (Terms of Use: Updated 7/7/05) | Powered by Invision Power Board v1.3 Final © 2003 IPS, Inc.
Page creation time: 0.0754 seconds | Archive

Check out the Shoutbox! Type in your name and the message to shout ;).