public void checkIdleActivity(){
        if(activeEvents.isEmpty()) {
            return;
        }
        Iterator<Job> it = activeEvents.iterator();
        while(it.hasNext()){
            DatedEvent event = (DatedEvent) it.next();
            if((event.getDate().before(new Date(System.currentTimeMillis()))) || (event instanceof InterruptableEvent && ((InterruptableEvent)event).shouldEnd())){
                idleEvents.add(event);
                it.remove();
            }
        }
    }