R
Rainer
Hello,
i want to leave a loop after 2 sec, befor it will a endless loop
the loop will delay the programm, till a port buffer is filled
with 22 bytes from device.
but not in every case the device is send 22 byte, from time to
time it send 15 or 13 bytes.
a snipped
while (port.BytesToRead < 22)
{
// do something
// if after 2 sec nomber of bytes < 22 --- > break
ore
// break after 2 seconds
}
how can i make this break , may be with a timer ?
many thanks for competent help.
Rainer
i want to leave a loop after 2 sec, befor it will a endless loop
the loop will delay the programm, till a port buffer is filled
with 22 bytes from device.
but not in every case the device is send 22 byte, from time to
time it send 15 or 13 bytes.
a snipped
while (port.BytesToRead < 22)
{
// do something
// if after 2 sec nomber of bytes < 22 --- > break
ore
// break after 2 seconds
}
how can i make this break , may be with a timer ?
many thanks for competent help.
Rainer