• 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: Accuracy of timestamping streamed data (code included - long)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accuracy of timestamping streamed data (code included - long)


  • Subject: Re: Accuracy of timestamping streamed data (code included - long)
  • From: Dado Colussi <email@hidden>
  • Date: Mon, 25 Sep 2006 23:45:48 +0200

I'm not an expert in this but reading thought your code my initial suspicion is on the use of timers. I would have the reader thread directly call the -read method in its main loop and use nanosleep() for waiting for next time to read data.

Dado


On Sep 25, 2006, at 23:07, Hank Heijink wrote:

Hi everyone,

I'm new to this list, and fairly new to Cocoa (although by now I've worked my way through Hillegass and Dalrymple + same). I'm working on the following problem:

For an application in behavioral science, I'm recording cursor movements on an old (10+ years) and big (3 by 5 feet) Quora digitizing tablet. The tablet streams 6-byte coordinates at a constant rate of about 160 Hz, and I want to get as constant a recording rate as I can get. After saving my data to a file, I find I'm fairly accurate, that is, I've timestamped my coordinates such that they're between 5 and 7.5 ms apart. The standard deviation of the differences in time is about 0.3 ms.

My question is, can I achieve even better accuracy, and if so, how? I'd like a more constant rate - I know the output rate of the tablet is more constant than this, and I'm not sure what causes the variability. My application is built in release mode and it's the only one running. Not sure if background daemons are having an effect and I don't know much about USB timing accuracy, but I guess at this level of accuracy, everything could have an effect...

I hope I'm clear... Any thoughts are much appreciated!



_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Accuracy of timestamping streamed data (code included - long) (From: Hank Heijink <email@hidden>)

  • Prev by Date: Re: Partially transparent child window
  • Next by Date: Re: Tracing Cocoa Functions
  • Previous by thread: Re: Accuracy of timestamping streamed data (code included - long)
  • Next by thread: Re: Accuracy of timestamping streamed data (code included - long)
  • Index(es):
    • Date
    • Thread