12 would make it into hours because 1 point is gained every 5 minute, so 12 times per hour.

But, thanks for the link, I will check that out. I agree the while loop was incredibly inefficient, so hopefully the link has something better to work with