bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how can I reduce the cpu time consumption?


From: pcazallas
Subject: how can I reduce the cpu time consumption?
Date: Wed, 26 May 2010 00:13:55 -0700 (PDT)

Hi,

Monitoring the cpu time and other resources catched by ncurses process, I
have noticed that it takes a lot of them while waiting for user interaction.
I think the reason is that I need a loop to treat the keyboard input char by
char (i.e., getting data into a form).

I would need the process to wait "sleeping" between one event and another,
without so much cpu consumption, and to wake up inmediately just whenever an
event occurs (not to wait n seconds with a sleep call).

Is there another way to do it? 
Are we bound to use that kind of "while (getch)" loop to catch the keyboard
input?

If you know another way to achieve it without a big cpu usage, please, tell
it to me.

Thanks and best regards,
Pablo Cazallas.
-- 
View this message in context: 
http://old.nabble.com/how-can-I-reduce-the-cpu-time-consumption--tp28677288p28677288.html
Sent from the Gnu - Ncurses mailing list archive at Nabble.com.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]