@fernando-stteffen Well, I wouldn't wait for a user input. I would write the alllowed time to a config file and read it at boot. Now I don't know your skills in bash, but this should be pretty easy, except you must set this at the previous boot.
There is no cron nor at in recalbox though ... You'll have to write the while loop by yourself