it's not an exact amount of time, but if that's not necessary, this might
help.
public function Delay(HowLong as single)
dim starttime as single
starttime=timer
do until timer-starttime>=howlong
doevents
loop
end function
then call it like this:
call Delay(300)
this will delay the program for 300 seconds (5 minutes), but not stall
anything.
I wrote a program that uses the Sleep call in
VB. When the program goes to sleep the CPU is
delayed. If I try to open an excel sheet while
it is sleeping it takes about 3 minuets to open
the sheet. Here's an example of the code
do
do the events
sleep X milliseconds
loop
This program is designed to always run in the
background of a PC and peroidicly wake up and
check for things. I am closing all connections
to a database before going to sleep. On average
this program sleeps for 5 or 10 minuites. I am
experiencing this delay in my CPU performance
when this program is on. Every program is
delayed when my program is running. PLEASE
HELP!!!!!
Sent via Deja.com http://www.deja.com/
Before you buy.