Results 1 to 6 of 6

Thread: Pausing for less than a second

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2000
    Location
    Christchurch, New Zealand
    Posts
    12

    Wink

    Hi I was wondering how can you make an application pause for less than a second without using a timer control event?

    Thankyou

  2. #2
    Member
    Join Date
    May 2000
    Posts
    45
    use the sleep() API call. It lets you specify the number of milliseconds to sleep for, and also tells Windows that something else can have the processor time

    Code:
    Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
    
    Sleep numberOfMillisecondsToSleepFor
    Note that this will prevent the app from responding to user events.

    Hope this helps
    K

    ----------------------------------
    VB6 Ent SP4 Win2K Pro Platform SDK

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2000
    Location
    Christchurch, New Zealand
    Posts
    12

    Wink Thankyou

    Thanks this helps heaps

  4. #4
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Boulder, Colorado, USA
    Posts
    325
    Keep in mind that the shortest delay you can have is 10ms. =)
    -Shickadance

  5. #5
    Fanatic Member kinjalgp's Avatar
    Join Date
    Apr 2000
    Location
    India
    Posts
    535

    Talking

    Then I think timer is better.


    Kinjal

  6. #6
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Boulder, Colorado, USA
    Posts
    325

    Thumbs down

    Timer is the same way.

    didn't you hear about the new Microsoft Math?

    1 = 10 Maybe
    5 = 10 Maybe
    7 = 10 Maybe
    11 = 20 Maybe 15

    You can't trust these routines at short frequencies.

    I have done multiple test on this, it's a nightmare for fast COM port timing.

    Good Luck
    -Shickadance

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