Board index » cppbuilder » How to make a constant delay?

How to make a constant delay?

How about the Win32 API function Sleep()?

HTH,
JR

"Jackie Yeh (?-s?u)" <jackie...@ms7.url.com.tw> wrote in message
news:3ac029fe_1@dnews...

Quote
> Hi, all:
>     I want a constant delay under BCB 4.0. That is,
>         ConstDelay(100); // Delay 100ms

>     The VCL component TTimer is not suitalbe for me. When I set
> "Timer1->Enabled=true;"
> in some subroutine, The timeout event will not happen unless the program
> counter leave this
> subroutine.

>     I think there should be some simple method to do this.

> Thanks.

> Jackie

 

Re:How to make a constant delay?


Hi, all:
    I want a constant delay under BCB 4.0. That is,
        ConstDelay(100); // Delay 100ms

    The VCL component TTimer is not suitalbe for me. When I set
"Timer1->Enabled=true;"
in some subroutine, The timeout event will not happen unless the program
counter leave this
subroutine.

    I think there should be some simple method to do this.

Thanks.

Jackie

Re:How to make a constant delay?


Try simply Sleep(100);

Gambit

Jackie Yeh (?-s?u) <jackie...@ms7.url.com.tw> wrote in message
news:3ac029fe_1@dnews...

Quote
>     I want a constant delay under BCB 4.0. That is,
>         ConstDelay(100); // Delay 100ms

>     The VCL component TTimer is not suitalbe for me. When I set
> "Timer1->Enabled=true;"
> in some subroutine, The timeout event will not happen unless the program
> counter leave this subroutine.

Other Threads