I was wondering if anyone had seen this timing issue that I am
having. Basically I am trying to see how long a picture is presented
on the screen so my basic code looks like:
for i = 1:n
SCREEN('CopyWindow', ...);
timeonset = GetSecs;
screen(window,'waitblanking',waitlength);
SCREEN('CopyWindow', ...);
timenextpic = GetSecs;
data(i) = timenextpic-timeonset;
end
The problem is that data looks like:
data =
Columns 1 through 9
0.0333 0.0287 0.0287 0.0332 0.0332 0.0331
0.0332 0.0332 0.0287
Columns 10 through 18
0.0288 0.0332 0.0334 0.0287 0.0332 0.0287
0.0334 0.0334 0.0335
Columns 19 through 21
0.0287 0.0335 0.0335
While the descrepency isn't all that bad. I often seem to get that 5
msec descrepency (note: waitlength = 2). This is not a big deal, but
it is very consistent that most of the lengths are around 33.3 msec
(as they should be), but a significant portion are around 28.7 msec,
which is strange. Any clue what is going on here? Is the refresh
rate of the monitor flipping from 60 to 70 Hz for no apparent
reason? When I use framerate it says that the frame rate is 60 Hz
very very consistently.
Thank you,
Avniel
having. Basically I am trying to see how long a picture is presented
on the screen so my basic code looks like:
for i = 1:n
SCREEN('CopyWindow', ...);
timeonset = GetSecs;
screen(window,'waitblanking',waitlength);
SCREEN('CopyWindow', ...);
timenextpic = GetSecs;
data(i) = timenextpic-timeonset;
end
The problem is that data looks like:
data =
Columns 1 through 9
0.0333 0.0287 0.0287 0.0332 0.0332 0.0331
0.0332 0.0332 0.0287
Columns 10 through 18
0.0288 0.0332 0.0334 0.0287 0.0332 0.0287
0.0334 0.0334 0.0335
Columns 19 through 21
0.0287 0.0335 0.0335
While the descrepency isn't all that bad. I often seem to get that 5
msec descrepency (note: waitlength = 2). This is not a big deal, but
it is very consistent that most of the lengths are around 33.3 msec
(as they should be), but a significant portion are around 28.7 msec,
which is strange. Any clue what is going on here? Is the refresh
rate of the monitor flipping from 60 to 70 Hz for no apparent
reason? When I use framerate it says that the frame rate is 60 Hz
very very consistently.
Thank you,
Avniel