¿How can I to get the time of execution of an application?

  • Thread starter Carlos Villaseñor M.
  • Start date
C

Carlos Villaseñor M.

Hi everybody!

I need to make a benchmark executing a DLL's functions series in a "for"
cicle, but I need to get the initial y final time and then get the
difference to make a benchmark. I Tried with "Time of date, Now()", but I
can't to convert that results in an integer...¿How can I do that?

I appreciate some help

Regards
Carlos Villaseñor M.
 
T

tommaso.gastaldi

hi Carlos, there are several ways to do it. Here is the most primitive:

Dim StartTime As Date = Now
'processing here ...
MsgBox("ElapsedTime: " &
Now.Subtract(StartTime).TotalMilliseconds & " millisecs")

-tom

Carlos Villaseñor M. ha scritto:
 
C

Cor Ligthert [MVP]

Carlos,

Measuring time on a multipurpose computer is never sure. Therefore you have
to do things more times.

I use for this

dim start as integer = environment.tickscount ' to get a time in
milliseconds
I hope this helps,

Cor
 

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

Top