Timeline for timestamps?

Hi folks,

I do research in cognitive science and use pygame to run experiments,
which in turn employs SDL. Right now I have to manually add timestamps
to input events as my experiment loop detects their presence in
pygame’s event queue, however I anticipate that it would be much more
accurate if these timestamps were automatically created by SDL. While
it may not seem to make much difference, our research is often looking
for effects on the order of a few milliseconds, so reducing the
variability in the accuracy of the timestamps is very important.

I notice that back in July there was discussion of adding timestamps
(http://lists.libsdl.org/pipermail/sdl-libsdl.org/2011-July/081555.html);
is there any timeline for this addition?

Cheers,

Mike–
Mike Lawrence
Graduate Student
Department of Psychology
Dalhousie University

~ Certainty is folly… I think. ~

There’s actually a patch for this in the latest snapshot:
http://www.libsdl.org/tmp/SDL-1.3.zip

Can you try it out and see if it helps?On Sun, Jan 1, 2012 at 10:13 PM, Mike Lawrence <mike.lwrnc at gmail.com> wrote:

Hi folks,

I do research in cognitive science and use pygame to run experiments,
which in turn employs SDL. Right now I have to manually add timestamps
to input events as my experiment loop detects their presence in
pygame’s event queue, however I anticipate that it would be much more
accurate if these timestamps were automatically created by SDL. While
it may not seem to make much difference, our research is often looking
for effects on the order of a few milliseconds, so reducing the
variability in the accuracy of the timestamps is very important.

I notice that back in July there was discussion of adding timestamps
(http://lists.libsdl.org/pipermail/sdl-libsdl.org/2011-July/081555.html);
is there any timeline for this addition?

Cheers,

Mike


Mike Lawrence
Graduate Student
Department of Psychology
Dalhousie University

~ Certainty is folly… I think. ~


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Check out this
http://hg.libsdl.org/SDL/rev/d166819bf2b3On Mon, Jan 2, 2012 at 5:13 AM, Mike Lawrence <mike.lwrnc at gmail.com> wrote:

Hi folks,

I do research in cognitive science and use pygame to run experiments,
which in turn employs SDL. Right now I have to manually add timestamps
to input events as my experiment loop detects their presence in
pygame’s event queue, however I anticipate that it would be much more
accurate if these timestamps were automatically created by SDL. While
it may not seem to make much difference, our research is often looking
for effects on the order of a few milliseconds, so reducing the
variability in the accuracy of the timestamps is very important.

I notice that back in July there was discussion of adding timestamps
(http://lists.libsdl.org/pipermail/sdl-libsdl.org/2011-July/081555.html);
is there any timeline for this addition?

Cheers,

Mike


Mike Lawrence
Graduate Student
Department of Psychology
Dalhousie University

~ Certainty is folly… I think. ~


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Ah, perfect! I’m not sure how to get pygame to recognize and pass
along this new event information, but I’ll try the pygame-users
mailing list for that one.

In the meantime, I notice that the patch uses SDL_GetTicks(), which
has a millisecond accuracy. The July posts mentioned alternative
approaches that might achieve microsecond or nanosecond accuracy; are
those more accurate approaches currently considered not worth
implementing?

MikeOn Mon, Jan 2, 2012 at 8:39 AM, Sam Lantinga wrote:

There’s actually a patch for this in the latest snapshot:
http://www.libsdl.org/tmp/SDL-1.3.zip

Can you try it out and see if it helps?

On Sun, Jan 1, 2012 at 10:13 PM, Mike Lawrence <@Mike_Lawrence> wrote:

Hi folks,

I do research in cognitive science and use pygame to run experiments,
which in turn employs SDL. Right now I have to manually add timestamps
to input events as my experiment loop detects their presence in
pygame’s event queue, however I anticipate that it would be much more
accurate if these timestamps were automatically created by SDL. While
it may not seem to make much difference, our research is often looking
for effects on the order of a few milliseconds, so reducing the
variability in the accuracy of the timestamps is very important.

I notice that back in July there was discussion of adding timestamps
(http://lists.libsdl.org/pipermail/sdl-libsdl.org/2011-July/081555.html);
is there any timeline for this addition?

Cheers,

Mike


Mike Lawrence
Graduate Student
Department of Psychology
Dalhousie University

~ Certainty is folly… I think. ~


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org