• 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: capturing user reaction times in msecs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: capturing user reaction times in msecs


  • Subject: Re: capturing user reaction times in msecs
  • From: Scott Ribe <email@hidden>
  • Date: Tue, 19 Dec 2006 09:54:12 -0700
  • Thread-topic: capturing user reaction times in msecs

> For my purposes, I think that close enough is good enough--especially if the
> error margin is constant.  (That is, if every time the display becomes visible
> the system takes the same amount of time to get it onscreen).  I'm asking a
> much, much lower level question.  What code do I use?  I am unable to find a
> simple function or Class that returns the time to the msec. For example, I can
> find a "possible token in the Calendar Format String" that will specify msecs
> (%F), but I have no idea how to use it.

I was going to say years:months:days:hours:minutes:seconds:sinceDate: but I
see it takes an int * for seconds. Wow, it really appears that there may not
be a Cocoa function for this!

You have two options, BSD and Carbon.

#include <sys/time.h>
struct timeval tv;
struct timezone tz;
gettimeofday( &tv, &tz )

#include <Carbon/Carbon.h>
double tm = CFAbsoluteTimeGetCurrent ();

But note that the error will not be constant. From the time you issue
drawing commands until the time they are visible, I would expect will
normally vary from about 0 to 1 full refresh cycle of the display.

--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 722-0567 voice


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: capturing user reaction times in msecs
      • From: Ronny Reichmann <email@hidden>
References: 
 >Re: capturing user reaction times in msecs (From: julia Cline <email@hidden>)

  • Prev by Date: Re: capturing user reaction times in msecs
  • Next by Date: Re: capturing user reaction times in msecs
  • Previous by thread: Re: capturing user reaction times in msecs
  • Next by thread: Re: capturing user reaction times in msecs
  • Index(es):
    • Date
    • Thread