Results 1 to 3 of 3

Thread: gettickcount() bug?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2001
    Location
    KL Malaysia
    Posts
    64

    gettickcount() bug?

    I have this proxy server running on Windows 98 for months now, and when I tried running a API call from this example: http://www.vbworld.com/api/winapi/index3.html I seem to get negative numbers. Is it because Windows is not designed to run that long?

  2. #2
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    The elapsed time is stored as a DWORD value. Therefore, the time will wrap around to zero if the system is run continuously for 49.7 days.
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  3. #3
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    DWORD is unsigned, however, VB's Long is signed, meaning that when you get past 2 billion (half the range) it wraps round to the most negative number.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

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