It is shown that the time to ruin and the recovery time in a risk process have the same distribution as the busy period in a certain queueing system. Similarly, the deficit at the time of ruin is distributed as the idle period in a single-server queueing system. These duality results are exploited to derive upper bounds for the expected time to ruin and the expected recovery time as defined by Egídio dos Reis (2000). When the claim size is generally distributed, Lorden's inequality is applied to derive the bounds. When the claim-size distribution is of phase type, tighter upper bounds are derived.