• 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
Re: Getting small time increments
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting small time increments


  • Subject: Re: Getting small time increments
  • From: Ondra Cada <email@hidden>
  • Date: Sun, 16 Sep 2001 11:13:11 +0200

Mike,

>>>>>> Mike Willhide (MW) wrote at Sat, 15 Sep 2001 23:56:04 -0500:
MW> How do you go about getting small time increments (on the order of
MW> milliseconds) from the system in a cocoa application? Every function I
MW> saw in the CF documentation was only accurate to a second. I ask because
MW> I'm trying to run some physical simulations that depend on the size of
MW> the time step.

NSTimeInterval (widely used in Foundation) is a second-based, not
second-accurate. It is actually a double which represents milliseconds (as
0.001 in/decrements) all right; (I think the accurracy is somewhere in the
usecs /0.000001/ order, but I am *not* sure of that).

Also with NSCalendarDate you can use milliseconds directly (through the
string-export and string-import).
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc


  • Follow-Ups:
    • Re: Getting small time increments
      • From: j o a r <email@hidden>
References: 
 >Getting small time increments (From: Mike Willhide <email@hidden>)

  • Prev by Date: Re: Can't Create!
  • Next by Date: Re: Following focus and scrolling controls into view
  • Previous by thread: Getting small time increments
  • Next by thread: Re: Getting small time increments
  • Index(es):
    • Date
    • Thread