Clever ways to restrict integer from 100 based to 60 based for time values? (e.g.60 seconds in a minute)
<p>I am required to store a time value in an integer in the format of <code>HHMMSS</code>. this time value is incrementing every second (basically a custom clock). however, since integers are naturally 10 based, I must implement a large cumbersome logic that extracts each digits and checks for 60 seconds in a minutes, 60 minutes in an hour and 24 hours a day. I wonder if there is some clever ways to do it without a massive if/else if chunk. </p>
