The life of a star basically depended on the hydrogen contained with in it. A star burns hydrogen during majority period of its life and convert hydrogen into helium on the main sequence. So the main sequence life time is determined by the mass of the star as mass of hydrogen contained is equivalent to the mass of star and the life time is dependent on the mass of the hydrogen.
Thus, it can be stated that mass of star is directly proportional to its lifetime.