Calculating procedure run time

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I am developing a feature which reports total time procedure consumed from
the start till the end of application run. The problem is that duration of
the procedure’s run cycle is measured in milliseconds. I’ve tried a few ways,
but no success. Any idea?

Thanks.
 
Use a field of type Currency to store the duration in seconds.

Currency is a fixed data type, that stores values precisely to 4 decimal
places.
 
Thanks for reply.
I am using the following algorithm:
===============================================
‘Declarations
Static Time_Total as double
Dim Time_Start as double
Dim Time_End as double

‘Body of procedure
Time_Start = Time()

PROCEDURE STATEMENTS

Time_End = Time ()
Time_Total = Time_Total + (Time_End - Time_Start)

===============================================

As you can see I am using double for time variables (Currency type probably
does not change result).
Questions:
1. Are there any problems with this algorithm?
2. When time is presented numerically (for example, 0.528657407407407) what
is a unit of measure?
 
The unit of measurement is Days. Multiply it by 24 for
hours, that by 60 for minutes and by another 60 for seconds.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top