PennController for IBEX › Forums › Support › Timing units
Tagged: time units
- This topic has 6 replies, 3 voices, and was last updated 2 years, 6 months ago by Jeremy.
-
AuthorPosts
-
May 21, 2020 at 4:46 pm #5296ecansecoParticipant
Hi, I am new to pcibex. Following your tutorial and after watching your recent Webinar, I managed to create a simple semantic priming study (200 trials). However, I want to confirm the time units for stimulus duration and for the reaction times. When I type newTimer(300), can I assume that this is exactly 300 msec? Also, when I subtract the EventTime of one event minus the EventTime of previous one, can I assume that the result is in milliseconds?
Thanks.
Enriqueta
May 21, 2020 at 6:18 pm #5298JeremyKeymasterHi Enriqueta,
Chances are it won’t be exactly 300ms, because performance varies with different hardware and software configurations. Timer elements periodically check the browser’s current timestamp, usually 60 times per second, generally matching the display refresh rate. So running a 300ms timer will effectively take between 300 and 316ms under normal circumstances.
Yes, the EventTime values are also expressed in milliseconds, and subtracting two of them will accordingly tell you how many milliseconds passed between the two reported events.
Jeremy
May 21, 2020 at 6:40 pm #5299ecansecoParticipantThanks a lot Jeremy, both for your prompt response and for the information provided.
One more thing appeared that you may have a suggestion for. Right now I have the Sequence( “Intro”, “Ready” , randomize(“Trials”) , “Thanks” ) and it is working great. However, this does not allow any breaks in the middle of the 200 (randomized) trials. I know how to add Timers to add breaks BETWEEN sections of my sequence but I don’t know how to insert a break (within “Trials”) after every 40 trials. In other programs I have used things like ‘counters’ and I imagine that something like that can be added but, how can I make sure that “Trials” presents 40 trials, gives a break (with the participant pressing a button when they are ready to continue) and then continues with the next 40 without losing track of which ones have been presented so far?
Finally, in trying to find help, pcibex suggests that I consult the Ibex manual but when I click on the link provided, it fails to show me the manual.
Enriqueta
May 21, 2020 at 8:19 pm #5301JeremyKeymasterThank you for spotting the broken link, it looks like Alex Drummond removed the PDF version of the Ibex manual.
You can use a global Var element to keep track of a counter. Add this at the beginning of your template trials:
newVar("counter", 0).global().set(v=>v+1) .test.is(v=>v%40==0) .success( newButton("Take a break").print().log().wait().remove() ) ,
Jeremy
March 12, 2022 at 5:38 pm #7866Larissa_CuryParticipantDear Jeremy,
Is it possible to randomize the time? I mean, I’d like to set my time randomly from 1000 to 2600 milisseconds each trial, something like this:
newTimer(“timer-D1”,1000 ~ 2600) (“between 1000 up to 2600 milisseconds”)
.start()
.wait()Is it possible?
- This reply was modified 2 years, 6 months ago by Larissa_Cury.
March 13, 2022 at 9:27 am #7870Larissa_CuryParticipantWould this work:
newTimer(“timer-D1”,1000,2600)
.start()
.wait()?
March 14, 2022 at 1:50 pm #7878JeremyKeymasterHi Larissa,
You can only pass up to two arguments to
newTimer
: a string to name the element, and a number representing the duration. If you pass a third argument, it will simply be ignoredYou can do
newTimer("timer-D1", 1000+Math.round(1600*Math.random()))
if you want to get a random number between 1000 and 2600Jeremy
-
AuthorPosts
- You must be logged in to reply to this topic.