Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
  Database
Automation
OS/Networking
Graphics
Links
Tools
» Regular Expr Tester
» Free Tools

Benchmarks with millisecond accuracy

Total Hit ( 3870)

Rate this article:     Poor     Excellent 

 Submit Your Question/Comment about this article

Rating


 


The Timer function returns a value which is only accurate to about 55 milliseconds, therefore it is not very useful for doing accurate benchmarks. If you need a better resolution you may try out this function:

Click here to copy the following block
Private Type SMPTE
  hour As Byte
  min As Byte
  sec As Byte
  frame As Byte
  fps As Byte
  dummy As Byte
  pad(2) As Byte
End Type
Private Type MMTIME
  wType As Long
  units As Long
  smpteVal As SMPTE
  songPtrPos As Long
End Type
Private Declare Function timeGetSystemTime Lib "winmm.dll" (lpTime As MMTIME, _
  ByVal uSize As Long) As Long

' return the current system time (in milliseconds)

Function GetCurrentTime() As Long
  ' assign this value to wType field to
  ' specify time measurement in milliseconds
  Const TIME_MS = 1
  Dim mmt As MMTIME
  mmt.wType = TIME_MS
  timeGetSystemTime mmt, LenB(mmt)
  GetCurrentTime = mmt.units
End Function


Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )


Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.