• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSTimer Inaccurate?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTimer Inaccurate?


  • Subject: NSTimer Inaccurate?
  • From: Sanford Selznick <email@hidden>
  • Date: Mon, 30 Sep 2002 07:24:54 -0700

I've got an NSTimer that's supposed to fire every 24 hours. But my logs reveal that it's really firing every 6 days or so:

myTimer = [NSTimer
timerWithTimeInterval:(60 * 60 * 24)
target:self
selector:@selector(myAction:)
userInfo:nil
repeats:YES];

[myTimer retain];

[[NSRunLoop currentRunLoop]
addTimer:myTimer
forMode:@"kCFRunLoopDefaultMode"];

This is on a PowerBook that sleeps often. The timer is used in a background only application. 10.2.1.

What am I doing wrong?

Thanks,
Sanford
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: NSTimer Inaccurate?
      • From: "Mark's Studio" <email@hidden>
  • Prev by Date: Re: [newbie] Handling a preferences window
  • Next by Date: Re: NSTimer Inaccurate?
  • Previous by thread: [Q] Activating and deactivating fonts
  • Next by thread: Re: NSTimer Inaccurate?
  • Index(es):
    • Date
    • Thread