You can use PROFILES, you can set all sorts of resource limits; there is an IDLE_TIME parameter. Look at the doc. for more detail.


IDLE_TIME: Specify the permitted periods of continuous inactive time during a session, expressed in minutes. Long-running queries and other operations are not subject to this limit.