?
Solved

Timing Database Performance

Posted on 2000-03-29
1
Medium Priority
?
147 Views
Last Modified: 2010-05-02
Hi,

    I'm doing a bit of performance testing to compare inline SQL with stored procs. I need a way to time the execution of the stored proc from VB. The timer control is a pain in the ass - what's the easiest way to do this (down to the millisecond if poss, thousandths will probably do).

All I want to do is call a sub to start and stop the timer, e.g.

StartTimer
set rsResults = BusinessObject.getResults
lngTime = StopTimer

Something like that would be cool.

Cheers, Nik.

0
Comment
Question by:NikWhitfield
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
wpsjr1 earned 200 total points
ID: 2666524
Option Explicit

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

Dim lStartTime&

Sub StartTimer()
  lStartTime = timeGetTime
End Sub

Function StopTimer() As Long
  StopTimer = timeGetTime - lStartTime
End Function

That should do it.

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month14 days, 9 hours left to enroll

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question