kastman/psychopy — comment on commit f1fc6b6a7d948607bbe52dd33ef17cbf27f03af6
File:  line 0
By kastman:

What do you fellows think of these tests? I borrowed a lot from the experiment control demo, and am just checking that there sync pulses were added correctly and that onset times can be collected. I also subclassed StandardError to create a TimeoutError, which is useful for testing and describing what's going on, and added a timeout option to launchScan. All of those are opinionated decisions and I'm not sure you'll agree, so feel free to tell me what you think! Also, since I'm explicitly referencing the tuple, the test won't pass without my earlier commit, even on the case that currently 'works'.

Regarding the clock, Jeremy and I were talking off-github:

> also, I suspect that you might want self.clock.getTime() instead of core.getTime() ?

And I explained I chose core.getTime() because...

> I used core.getTime() because it looked like the format similar to the ones
> used by pygame (I think milliseconds since epoch, the time reported by
> time.Time() [and aliased as core.getTime() on OSX) and not an elapsed
> time from 0, but I admit I didn't check the format of self.clock.getTime().
> If they're the same format, you're probably right in that we'd want to use
> the global clock passed to the emulator.

I threw print globalClock.getTime(); print core.getTime() into the demo right before the loop started after the global clock was initialized, and found the formats; even though both getTime() methods have the same name they return different things:

globalClock.getTime() => 0.0158641338348
core.getTime() => 1329938687.99

Since core is the right format for button presses (and when using core things look like they work right) I think we should stay with the original commit.

Hope this helps!

Erik