Turn a device off after it's been on for specific time