Switched time settings from long to Duration and added a timeout setting