Java Timer Function In Python With Parameters