changed int to time_t for idle times