5つのNSTimerを使用してバックグラウンドでさまざまなメソッドを実行するFoundationCLIツールがあります。これらのタイマーを(whileループなどではなく)実装して以来、プログラムのCPU使用率が急上昇していることに気づきました。誰かがこれについて何か情報を持っていますか?
編集:
コードスニペットは次のとおりです(現在、3つのタイマーのみが実装されています)。
[NSTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(executeInterval0Update) userInfo:nil repeats:YES];
[NSTimer scheduledTimerWithTimeInterval:5 target:self selector:@selector(executeInterval1Update) userInfo:nil repeats:YES];
[NSTimer scheduledTimerWithTimeInterval:10 target:self selector:@selector(executeInterval2Update) userInfo:nil repeats:YES];
[runLoop run];