timeout getgroups function