Computation of the probability of ruin within a finite time