Reduce CPU time while using serialport?
- From: jis <jismagic@xxxxxxxxx>
- Date: Thu, 06 Sep 2007 20:18:38 -0000
Hi,
I am using Win32::serialport for reading a data through a scanner
which is connected to the serial port.
I use polling as below.But this consumes 99% of my CPU time. and
slows down the system.
while(!($data=~/\r/))
{
$data=$Scanner->input(); #read the scanner port
$labeldata=$labeldata.$data; #append
}
Is there any way I implement interrupts or events using perl. Or is
there any other method to solve this issue.
I use WIndows NT4(its old..but i have to...)
Pls share your ideas.
Cheers,
jis
.
- Follow-Ups:
- Re: Reduce CPU time while using serialport?
- From: Brian McCauley
- Re: Reduce CPU time while using serialport?
- Prev by Date: Re: Have any Asynchronous I/O module in win32?
- Next by Date: Requesting feedback on new module: Log::Any
- Previous by thread: Re: Problem in redirection
- Next by thread: Re: Reduce CPU time while using serialport?
- Index(es):
Relevant Pages
|
|