定时器NSTimer的用法

时间:2022-08-20 18:03:10

    //时间间隔

    NSTimeInterval activeTimeInterval = NETWORK_SEND_ACTIVE_TIME;

    NSTimeInterval otherTimeInterval = NETWORK_SEND_OTHERS_TIME;

    //定时器

    NSTimer *mianTimer;

    mianTimer = [NSTimerscheduledTimerWithTimeInterval:activeTimeInterval target:selfselector:@selector(beginMainTimer:)userInfo:nilrepeats:YES];

Timer methods

 

- (void)beginMainTimer:(NSTimer *)theTimer

{

}