I currently have code that can display mins and seconds. But the problem I'm facing is that when the mins gets to 60, it cou开发者_JAVA百科nts up to 61 and beyond.
How can I add the hours?
-(void)update:(ccTime)dt{
        totalTime += dt;
        currentTime = (int)totalTime;
    if (myTime < currentTime)
{
    myTime = currentTime;
    [countUpTimer setString:[NSString stringWithFormat:@"%02d:%02d", myTime/60, myTime%60]];
}
}
[countUpTimer setString:[NSString stringWithFormat:@"%02d:%02d:%02d", myTime/3600, (myTime/60)%60, myTime%60]];
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论