Ok,

Please Follow these Steps.
Create Profile prof1 Limit Idle_Time 5;

Alter system Set Resource_Limit = True;

Alter User username Profile Prof1;

Connect That user, do any select and leave the session opened for five minutes, then Issue any select , You will get the Error that not Connect or so.

This parameter sessting is only as long as the Instance is Running. If you shutdown the Database that will be false.

Any Transactions Pending in that session will be rolled back.

Hope this will work.
Thanks