Generally you'd want to use SessionIsActive() on SessionManager, or I *think* CurrentTime() on the ServiceInstance object may do it as well. Some of the property collector calls don't actually trigger a session anti-idle, but SessionIsActive() usually will (I think).
There is also a socket timeout, to prevent sockets from getting flooded out. But any traffic to that socket will keep those from idling out (usually only a problem if you're process is sleeping for long periods of time).