Application of a generalised Levy residence time problem to neuronal dynamics