Results 1 to 4 of 4

Thread: How to get the time in 10's of a second?

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Posts
    1
    Hi!

    How do I get hold of the time in 10's of a second in VB 6.0?

    Or how do I make a DLL, whose purpose is to get the time in milliseconds, in C++ to use with in VB 6.0?

    Please help some students from Bergen, Norway.

  2. #2
    Frenzied Member Buzby's Avatar
    Join Date
    Jan 1999
    Location
    UK
    Posts
    1,670
    I don't know if it will help but the function Timer returns the number of seconds since midnight (and includes decimal places)

    eg;

    Msgbox Timer
    'Buzby'
    Visual Basic Developer
    "I'm moving to Theory. Everything works there."

  3. #3
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    You could always use the timer control.
    Have the interval set to 100ms.
    Then every time it fires, thats a 1/10th of a second.

    You can then add that onto the current time in seconds.
    Obviously the two would have to be in sync.
    So you'd just start the timer once the seconds of the system clock change.

    - jamie
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  4. #4
    Fanatic Member
    Join Date
    Aug 2000
    Posts
    736
    Might try this, along with plenderj's and Buzby's suggestions.
    Code:
    Private Sub Timer1_Timer()
        Label1.Caption = Format(Now(), "hh:nn:ss:") & Mid(Timer, 7, 1)
    End Sub

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