On 11 Sep 2008, at 11:46 am, J. Todd Slack wrote:

Hi All,

Does anyone have an example of deciding when you have more than 60 seconds you have minutes and seconds? (hh:mm:ss)

Example: 65 seconds should be 00:01:05


if( seconds > 59 )
{
    ++minutes;
    seconds = 0;
}


or, if you can't catch every second:

minutes = seconds / 60;
seconds = seconds % 60;


hth,

Graham
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to