int -> auto. Max time not working on linux. Removed commented code.