BF: Import Clock utils in core for parity with PsychoPy #607
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, if you do the following in a Code Component:
you'll get an attribute error because
PsychoJS.coredoesn't have aCountdownTimer- but it does exist, it's just inPsychoJS.util.We could catch this in the translation in PsychoPy and sub in
util, but for something as simple as just importing a class in a second location it seems reasonable to change the JS end to not need this substitution. Plus it means that users manually coding (with a Code Component set to "both") can refer tocore.CountdownTimer, which they might if they're used to PsychoPy.