From the NannyMUD documentation
2000-12-11
NAME
query_idle - give time since last command from a playerSYNTAX
int query_idle(object player)DESCRIPTION
Returns the number of seconds that an interactive player has been idle, ie the time since the last command was issued.NOTE
This is only relevant to interactive players and are not implemented for npc's.