  We show the existence of a limiting distribution $\cD_\cC$ of the adequately
normalized discrepancy function of a random translation on a torus relative to
a strictly convex set $\cC$. Using a correspondence between the small divisors
in the Fourier series of the discrepancy function and lattices with short
vectors, and mixing of diagonal flows on the space of lattices, we identify
$\cD_\cC$ with the distribution of the level sets of a function defined on the
product of the space of lattices with an infinite dimensional torus. We apply
our results to counting lattice points in slanted cylinders and to time spent
in a given ball by a random geodesic on the flat torus.
