  Rotational mixing in massive main sequence stars is predicted to
monotonically increase their surface nitrogen abundance with time. We use this
effect to design a method for constraining the age and the inclination angle of
massive main sequence stars, given their observed luminosity, effective
temperature, projected rotational velocity and surface nitrogen abundance. This
method relies on stellar evolution models for different metallicities, masses
and rotation rates. We use the population synthesis code STARMAKER to show the
range of applicability of our method. We apply this method to 79 early B-type
main sequence stars near the LMC clusters NGC 2004 and N 11 and the SMC
clusters NGC 330 and NGC 346. From all stars within the sample, 17 were found
to be suitable for an age analysis. For ten of them, which are rapidly rotating
stars without a strong nitrogen enhancement, it has been previously concluded
that they did not evolve as rotationally mixed single stars. This is confirmed
by our analysis, which flags the age of these objects as highly discrepant with
their isochrone ages. For the other seven stars, their nitrogen and isochrone
ages are found to agree within error bars, what validates our method.
Constraints on the inclination angle have been derived for the other 62
stars,with the implication that the nitrogen abundances of the SMC stars, for
which mostly only upper limits are known, fall on average significantly below
those limits. Nitrogen chronology is found to be a new useful tool for testing
stellar evolution and to constrain fundamental properties of massive main
sequence stars. A web version of this tool is provided.
