The function return 0, if the current is above currentMin. Otherwise it waits for the current to rise above currentMin, waits for wait_time seconcs and returns 1. e.g.: * = was_beamloss_petra( 80, 30)