millisec test timings and screen refresh rate

Phil Davis revdev at pdslabs.net
Fri Apr 20 00:31:04 EDT 2007


Thanks everyone. But... Let me put my question another way:

on mouseUp
   # lock screen -- aka "lock #1"
   wait 1 second
   show img 1
   # unlock screen -- also part of lock #1

   put the milliseconds into tStart
   wait 5 milliseconds

   # lock screen -- aka "lock #2"
   hide img 1
   #unlock screen -- also part of lock #2

   put the milliseconds - tStart & cr after fld 1
   set the vScroll of fld 1 to the formattedHeight of fld 1
   put (the number of lines in fld 1) into fld 2
end mouseUp


I ran the above script x times and got these results on my Apple 20" 
cinema display & intel mini:

- 50x with no locks/unlocks = 24% of times I saw the img
- 50x with lock #1 = 20% of times I saw the img
- 50x with lock #1 & #2 = 36% of times I saw the img

Ideally I would see the image 100% of the time - that's my goal. I'll 
experiment with the other methods of displaying the image and see if I 
can improve my results.

Thanks -
Phil Davis



> -----Original Message-----
> From: revdev at pdslabs.net
> To: use-revolution at lists.runrev.com
> Sent: Thu, 19 Apr 2007 5:19 PM
> Subject: millisec test timings and screen refresh rate
> 
>  I need some help here. My question is basically this: How do I 
> accurately track or calculate the exact moment at which an image becomes 
> visible on screen? 
>  
>  I have a client whose product is a psychological testing app, with a 
> battery of canned tests included. I'm reimplementing it in RunRev, 
> moving them away from SuperCard + a large handful of XCMDs. All the 
> millisecond timing used to be done in the XCMDs, but now RunRev can do 
> it natively, and on all platforms... wait, I don't need to sell you... 
> sorry. ;o) 
>  
>  Some tests require the Rev app to track the millisecs elapsed from when 
> an image is displayed on screen to when a user-initiated event occurs, 
> like a keypress. This means RR needs to know as precisely as possible 
> *when* the image became visible on screen. 
>  
>  (I can already hear some people shifting in their seats, muttering 
> "duh! just show the image, unlock screen and put the millisecs into a 
> variable!") 
>  
>  Is it that simple? I assume not. I need to figure out when the image 
> became visible, not when I told it to become visible. I'll need to 
> factor in screen refresh rate, whether testing is displayed on a CRT or 
> on a laptop (the normal delivery medium). This also leads me to ask: Do 
> laptop screens refresh the same way CRTs refresh? I doubt it. 
>  
>  How have you dealt with this in your RunRev experience? I bet *someone* 
> has dealt with this before. 
>  
> Thanks in advance for all responses. This list is so great! 
>  
> Phil Davis 



More information about the use-livecode mailing list