# Derivation of tau time-stepping in Gillespie algorithm?

I'm trying to find the derivation of tau ($$\tau$$) in the Gillespie algorithm. All the papers and chapters I've found simply say, without actually showing its derivation: "Tau is given by"

$$\tau = \frac{1}{a_0(X_t)}ln\frac{1}{r_1}$$

where $$a_0$$ is the propensity function, $$X_t$$ is the state vector and $$r_1$$ is one of two random numbers from the uniform distribution [0,1].

Specifically, I want to know where the $$ln \frac{1}{r_1}$$ comes from.

Does anybody know a good source where this is explained please?