# OSX: Screen(&#39;FrameRate&#39;)

**URL:** <https://psychtoolbox.discourse.group/t/osx-screen-39-framerate-39/1341>\
**Category:** Uncategorized\
**Created:** [January 15, 2005, 4:41pm UTC](https://psychtoolbox.discourse.group/t/osx-screen-39-framerate-39/1341 "2005-01-15T16:41:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anblick](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@anblick](https://psychtoolbox.discourse.group/u/anblick)\
**Post date:** [January 15, 2005, 4:41pm UTC](https://psychtoolbox.discourse.group/t/osx-screen-39-framerate-39/1341/1 "2005-01-15T16:41:44Z")

</div>

Screen('FrameRate') returns 0 on my laptop. Is it possible to force it   
to measure the frame rate, as in the OS9 version?  
  
For example, something like  
  
 fps=Screen('FrameRate',w); % frames per second  
 if fps == 0  
 % measure frame rate if Screen('FrameRate') fails  
 nsamples = 100;  
 ftime = zeros(1,nsamples);  
 Screen('Flip',w);  
 for i=1:nsamples  
 Screen('Flip',w);  
 ftime(i) = GetSecs;  
 end  
 fps = 1/mean(diff(ftime(3:end)));  
 end  
  
Is there some better way to do this?  
  
keith
