How is the time for a test tube in a centrifuge determined?
The short answer: check out equation 5 below

I will explain the whole story in terms of sedimenting particles, but you can easily read this as sedimenting droplets as well.

Necessary condition for sedimentation

If you want particles to sediment the first thing to check is whether their density is higher than the density of the liquid, if not: don't even bother. This can be easily shown on the basis of a force balance with buoyancy and gravity acting on the particles:
$$\tag{1} F_{net}=(\rho_{p}-\rho_{l})V_{p}g $$
where subscripts $p$ and $l$ stand for particle and liquid respectively.
What I should also mention here is that I neglect Brownian motion which can, for very small $V_p$ become a significant effect that avoids sedimentation even when the density of the particles is above that of the liquid.

For now, let's assume the particles are big enough to ignore Brownian motion. If we have a centrifuge it is typical to specify the centrifugal acceleration in terms of $a=Ng$ where $N$ is a multiplication factor dependent on the rotation speed of your centrifuge and the distance of the test tube to the center of rotation ($a=\frac{v^2}{r}$, see the wiki for details). The net force acting on the particles in a centrifuge is thus:
$$\tag{2} F_{net}=(\rho_{p}-\rho_{l})V_{p}Ng $$

Settling velocity

After the initial acceleration of the particles there will quickly be a force balance between the net force introduced by the centrifuge and the drag force on the particle. For a perfectly spherical particle that doesn't settle to fast this is simply the Stokes drag:
$$\tag{3}F_{drag}=6\pi\mu_l R_p v_s$$
where $\mu_l$ is the liquid viscosity, $R_p$ is the particle radius and $v_s$ is the settling velocity of the particle.

Balancing the drag with the centripetal force we obtain:
$$\tag{4} v_s=\frac{2(\rho_p-\rho_l)R_p^2Ng}{9\mu} $$.

Finally, to determine the settling time we need the liquid height in the test tube $h$ so we find $$\tag{5} t_s=\frac{h}{v_s} =  \frac{9\mu h}{2(\rho_p-\rho_l)R_p^2Ng } $$
Note that with respect to the settling height we take the worst case scenario here because we want all particles (also those close to the surface of the liquid) to settle.

Equation 5 nicely shows the influence of various parameters on the time a test tube has to stay in the centrifuge. Smaller particles means longer times, lower density difference also and obviously higher centrifugal acceleration means shorter times. Plugging in some typical values for $1 \mu$m particles in water $(\Delta\rho=100$kg/m$^3)$ and a strong centrifuge ($N=10^4$) we find that we need $O(10 s)$.

Discussion of the simplifications

Obviously there are quite some assumptions in the derivation above. 


Brownian motion might not be negligible therefore either increasing the settling time, or avoiding settling altogether.
Particles need to accelerate to their settling velocity first, this will also increase the settling time a bit.
In general particles will not be spherical. If, for example, the particles are more rod-shaped then the orientation will determine whether the settling time increases or decreases with respect to the spherical particle prediction. 


For many types of particles a Svedberg coefficient is tabulated in literature which will allow you to calculate the settling time without having to assume sphericity of the particles. In this document they indicate the use of Svedberg coefficients.

Clearly, these simplifications can mean that the prediction of equation 5 is of by a factor 10 (or maybe even 100 if you're unlucky) therefore in most practical situations you would use this equation as a starting point for some trial-and-error experiments. You can also use it to determine what will happen to the settling time when you e.g. run a new experiment with a different liquid or particle type.