Question by
RealSoftGames · Sep 20, 2016 at 11:11 AM ·
timercalculationmathscalculationsformula
Timer issues when converting to minutes,hrs,days,months,years
got an issue with my timer, i am trying to store a single sequence of seconds and convert that to minutes, hours, days, months, years
if (Time.time > nextTime)
time += 1.4f;
nextTime = Time.time + 1.4f;
print("minutes " + Mathf.RoundToInt(time / 60f) + " Hours " + string.Format("{0}", hours));
}
the issue is i am unable to reset the minutes, hours etc back to 0 once they reach the maximum
minutes = 60, hours 24, days 7, weeks 4, months 12
is their a maths formula i could use to convert this.
Comment