Results 1 to 3 of 3

Thread: Timer in VB.net

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2000
    Location
    Manchester NH
    Posts
    833

    Timer in VB.net

    how do i vb.net...



    [VB 6 CODE]

    dim T as double

    T=timer

    ' do something

    T=Timer-T

    msgbox "it took " & T & " seconds to complete"

    thanks

    - Kurt
    Kurt Simons
    [I know I'm a hack but my clients don't!]

  2. #2
    PowerPoster
    Join Date
    Mar 2002
    Location
    UK
    Posts
    4,780

    Re: Timer in VB.net

    What your after is a stopwatch object:

    Code:
    Dim objStopWatch As Stopwatch = Stopwatch.StartNew
    ... do stuff
    objStopWatch.Stop()
    MsgBox objStopWatch.ElapsedMilliseconds.ToString

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2000
    Location
    Manchester NH
    Posts
    833

    Re: Timer in VB.net

    thanks
    Kurt Simons
    [I know I'm a hack but my clients don't!]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width