  Consider an inhomogeneous Poisson process and let $D$ be the first of its
epochs which is followed by a gap of size $\ell>0$. We establish a criterion
for $D<\infty$ a.s., as well as for $D$ being long-tailed and short-tailed, and
obtain logarithmic tail asymptotics in various cases. These results are
translated into the discrete time framework of independent non-stationary
Bernoulli trials where the analogue of $D$ is the waiting time for the first
run of ones of length $\ell$. A main motivation comes from computer
reliability, where $D+\ell$ represents the actual execution time of a program
or transfer of a file of size $\ell$ in presence of failures (epochs of the
process) which necessitate restart.
