-   Linux - Software (
-   -   how can I put the CPU in sleep mode? (

asahlot 11-02-2006 08:51 AM

how can I put the CPU in sleep mode?
Hi all
I want to put CPU in sleep mode that is I want to execute only Idle process on CPU for continuous 5 Sec. So I think that if i use msleep (5000) in kernel version 2.6 then I can achieve my aim. ( I dont know if I am wrong). But as in kernel 2.4 we dont have msleep () function, how can we make CPU to execute Idle task for 5 secs.?

Do we have some way of scheduling IDLE task for some secs??
Please help me in this regard. its very very urgent for me.
Thanks in advance.

J.W. 11-03-2006 02:00 AM

Just use the sleep command in your script

man sleep

asahlot 11-03-2006 10:23 AM

@J.W. Thanks for the reply.
You are right. But I need to do that in my module and not in script.
Can you please tell me in that case.
Thanks in advance.
