﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Millisecond Forums » Millisecond Forums » Inquisit 4  » How to match stimulus presentation time</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Thu, 17 Sep 2026 10:00:44 GMT</lastBuildDate><ttl>20</ttl><item><title>How to match stimulus presentation time</title><link>https://forums.millisecond.com/Topic22658.aspx</link><description>Hi Dave,&lt;br/&gt; I have a question regarding how to optimally match stimulus presentation time based on former presentation time.&lt;br/&gt; In the task, a target stimulus is presented (screen 1). Next, participants see two stimuli (screen 2). One is the former target. Participants have to decide on which side the target was. After pressing a button, the stimuli disappear. Afterwards a new stimulus should be presented for as long as the participant saw either the target or the distractor in sum (screen 3). This means, the stimulus on the third screen (neutral) should be presented either the time screen 1 and screen 2 where presented OR the time only screen 2 was presented&lt;br/&gt; &lt;br/&gt; My problem now is that I am not sure how to get the proper time. As the time the stimuli are displayed depends on the monitor refresh rate, which property takes this into account?&lt;br/&gt; The latency measures the time from stimulus onset to response (or timeout if no response), but does not take into account, that after a response within a frame the picture can still be presented for a couple of milliseconds to finish the frame.&lt;br/&gt; The timeout seems &amp;nbsp;to take also other processes into account (trial preparation etc.). And the timeout also seems not to take into account that a frame is not finished when timeout occurs.&lt;br/&gt; &lt;br/&gt; Do I have to specify the numframes to be exact? But than I would have to calculate the number of frames based on each monitor (if there are differences). Or do I have to add a blank filler stimulus to get the stimulusonset for that and use this?&lt;br/&gt; &lt;br/&gt; Code example:&lt;br/&gt; &amp;lt;trial present&amp;gt;&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / ontrialbegin = [values.target=list.target.nextvalue; values.distractor=list.distractor.nextvalue; values.neutral=list.neutral.nextvalue]&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / ontrialbegin = [values.target_hpos=50%]&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / stimulustimes = [0= target, present_text]&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / timeout = 1000&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / beginresponsetime = 0&lt;br/&gt; &amp;lt;/trial&amp;gt;&lt;br/&gt; &amp;lt;trial comp_T&amp;gt;&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / ontrialbegin = [values.target_hpos=list.2pos.nextvalue;&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; values.distractor_hpos=list.2pos.nextvalue; ]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / inputdevice = keyboard &lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / validresponse = (30, 38)&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / responsemode = free&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / stimulustimes = [0= target, distractor]&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / beginresponsetime = 0&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / iscorrectresponse = [values.target_hpos &amp;gt;50% &amp;amp;&amp;amp; trial.comp_T.response == 38]&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / iscorrectresponse = [values.target_hpos &amp;lt;50% &amp;amp;&amp;amp; trial.comp_T.response == 30]&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / ontrialend = [if ((values.target_hpos &amp;lt;50% &amp;amp;&amp;amp; trial.comp_T.response == 38)||(values.target_hpos &amp;gt;50% &amp;amp;&amp;amp; trial.comp_T.response == 30)) {values.incorrect = TRUE}]&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / ontrialend = [values.duration = trial.comp_T.latency + trial.present.timeout]&lt;br/&gt; &amp;lt;/trial&amp;gt;&lt;br/&gt; &amp;lt;trial comp_D&amp;gt;&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / ontrialbegin = [values.target_hpos=list.2pos.nextvalue;&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; values.distractor_hpos=list.2pos.nextvalue; ]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / inputdevice = keyboard &lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / validresponse = (30, 38)&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / responsemode = free&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / stimulustimes = [0= target, distractor]&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / responsetime = 0&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / iscorrectresponse = [values.target_hpos &amp;gt;50% &amp;amp;&amp;amp; trial.comp_D.response == 38]&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / iscorrectresponse = [values.target_hpos &amp;lt;50% &amp;amp;&amp;amp; trial.comp_D.response == 30]&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / ontrialend = [if ((values.target_hpos &amp;lt;50% &amp;amp;&amp;amp; trial.comp_D.response == 38)||(values.target_hpos &amp;gt;50% &amp;amp;&amp;amp; trial.comp_D.response == 30)) {values.incorrect = TRUE}]&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / ontrialend = [values.duration = trial.comp_D.latency]&lt;br/&gt; &amp;lt;/trial&amp;gt;&lt;br/&gt; &amp;lt;trial neutral&amp;gt;&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / ontrialbegin = [if( values.cond == "target_comp" || values.cond == "choice_comp_T") {values.duration = trial.comp_t.latency + trial.present.latency}]&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / ontrialbegin = [if( values.cond == "distractor_comp" || values.cond == "choice_comp_D") {values.duration = trial.comp_d.latency}]&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / ontrialbegin = [values.neutral_hpos=50%]&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / stimulustimes = [0= neutral, clearing]&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / timeout = values.duration&lt;br/&gt; &amp;lt;/trial&amp;gt;&lt;br/&gt; &lt;br/&gt; Thanks!&lt;br/&gt;</description><pubDate>Wed, 11 Oct 2017 13:39:48 GMT</pubDate><dc:creator>MartE</dc:creator></item><item><title>RE: How to match stimulus presentation time</title><link>https://forums.millisecond.com/Topic22676.aspx</link><description>&lt;br/&gt;Great! Thanks for your help!&lt;br/&gt;</description><pubDate>Wed, 11 Oct 2017 13:39:48 GMT</pubDate><dc:creator>MartE</dc:creator></item><item><title>RE: How to match stimulus presentation time</title><link>https://forums.millisecond.com/Topic22675.aspx</link><description>&lt;div data-id="22674" class="if-quote-wrapper" unselectable="on" data-guid="1507753410986"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="22674" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="22674" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="22674" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;MartE - Wednesday, October 11, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-22674"&gt;&lt;div class="if-quote-message-margin"&gt;Yes, this makes it clear how the attributes work. So basically, this means, the dependent presentation of trial 3 is most precise (closest) to the presentation duration of the previous trials when I use the latency instead of anything else. However, still dealing with a small uncertainty. Am I right?&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="22674"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;Yes, that's right (assuming I understand your design / its desired properties correctly).&lt;br/&gt;</description><pubDate>Wed, 11 Oct 2017 13:24:29 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: How to match stimulus presentation time</title><link>https://forums.millisecond.com/Topic22674.aspx</link><description>Yes, this makes it clear how the attributes work. So basically, this means, the dependent presentation of trial 3 is most precise (closest) to the presentation duration of the previous trials when I use the latency instead of anything else. However, still dealing with a small uncertainty. Am I right?&lt;br/&gt;&lt;br/&gt;</description><pubDate>Wed, 11 Oct 2017 11:00:52 GMT</pubDate><dc:creator>MartE</dc:creator></item><item><title>RE: How to match stimulus presentation time</title><link>https://forums.millisecond.com/Topic22672.aspx</link><description>&lt;div data-id="22671" class="if-quote-wrapper" unselectable="on" data-guid="1507740578487"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="22671" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="22671" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="22671" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;MartE - Wednesday, October 11, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-22671"&gt;&lt;div class="if-quote-message-margin"&gt;I just tried out a little bit with the elapsed time solution. It seems the differences are relatively high. When I compare the duration provided by the latency and the duration i calculated with the elapsed time, there are differences of easily 100 to 200 ms. How precise is the ontrialbegin/end attribute when it comes to the time a stimulus is presented? Are there processes performed inbetween which need additional time? I question if this really is a more precise way to calculate the delay than based on the latency. I am not shure here how Inquisit works. But if latency ends a trial with an inaccuracy of up to one frame (when timeout or response is set nearly at a frame start), then the inaccuracy would be up to 2 frames (about 34 ms). In this case, the inaccuracy would be far less then based on the elapsed time.&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="22671"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;/ontrialbegin is executed when the trial object starts executing. That is, _before_ the trial presents any stimuli / begins its stimulus presentation sequence. After any /ontrialbegin logic is done, the trial does some more preparing of stimuli and then starts displaying them starting with the 1st display frame it can catch. In other words: The time you log /ontrialbegin is indicative of the start of the execution of the &amp;lt;trial&amp;gt;, not indicative of any stimulus onset _within_ that trial object.&lt;br/&gt;&lt;br/&gt;Latency is measured relative to the stimulus presentation sequence, however.&lt;br/&gt;&lt;br/&gt;So, in sum, any discrepancy you see between latency and the time calculations done /ontrialbegin and /ontrialend is due to stimulus preparation and waiting to catch the start of a display frame for the stimulus presentation sequence.&lt;br/&gt;&lt;br/&gt;Does that clarify?&lt;br/&gt;</description><pubDate>Wed, 11 Oct 2017 09:57:01 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: How to match stimulus presentation time</title><link>https://forums.millisecond.com/Topic22671.aspx</link><description>I just tried out a little bit with the elapsed time solution. It seems the differences are relatively high. When I compare the duration provided by the latency and the duration i calculated with the elapsed time, there are differences of easily 100 to 200 ms. How precise is the ontrialbegin/end attribute when it comes to the time a stimulus is presented? Are there processes performed inbetween which need additional time? I question if this really is a more precise way to calculate the delay than based on the latency. I am not shure here how Inquisit works. But if latency ends a trial with an inaccuracy of up to one frame (when timeout or response is set nearly at a frame start), then the inaccuracy would be up to 2 frames (about 34 ms). In this case, the inaccuracy would be far less then based on the elapsed time.&lt;br/&gt;</description><pubDate>Wed, 11 Oct 2017 07:45:47 GMT</pubDate><dc:creator>MartE</dc:creator></item><item><title /><link>https://forums.millisecond.com/Topic22668.aspx</link><description>Thanks for your help Dave!&lt;br/&gt;Just out of curiosity and to understand Inquisit better: Why is it more precise to store the information at the beginning of the two trials? Should it not be more precise to store data as directly as possible before and after the stimulus presentation within a trial? Between the end of a trial and the start of a new trial can also other processes happen and therefore time difference might be higher.&lt;br/&gt;</description><pubDate>Wed, 11 Oct 2017 05:00:50 GMT</pubDate><dc:creator>MartE</dc:creator></item><item><title>RE: How to match stimulus presentation time</title><link>https://forums.millisecond.com/Topic22662.aspx</link><description>&lt;div data-id="22661" class="if-quote-wrapper" unselectable="on" data-guid="1507664485426"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="22661" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="22661" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="22661" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;MartE - Tuesday, October 10, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-22661"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="22660" class="if-quote-wrapper" unselectable="on" data-guid="1507664485426"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="22660" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="22660" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="22660" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Tuesday, October 10, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-22660"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;br/&gt;I think the clearest measure you can get of a trial's actual duration is to (1) store script.elapsedtime in a variable /ontrialbegin in trial "A" (the 1st trial in the chain), (2) store script.elapsedtime in a variable /ontrialbegin in trial "B" (the 2nd trial in the chain), (3) calculating the difference B-A, and using the result in your further duration calculations. Does that make sense?&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="22660"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;Technically I already thought about something like that, but did now how to built it in Inquisit. So, yes this makes sense now. But would it also work to store elapsedtime at /ontrialbegin in trial A, store a second variable of elapsedtime at /ontrialend of trial A and calculate the difference to be more precise (and more flexible with filler trials in between)? &lt;br/&gt;And as follow up question: Is there a way to save/read this information of real trialduration to/from the standard output file?&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="22661"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;&amp;gt; But would it also work to store elapsedtime at /ontrialbegin in trial A, store a second variable of elapsedtime at /ontrialend of trial A.&lt;br/&gt;&lt;br/&gt;You can do that as well, although I'd argue that the other option would be (slightly) more precise.&lt;br/&gt;&lt;br/&gt;Whatever option you go for, though, you can log that information to the data file by adding the respective values to the &amp;lt;data&amp;gt; element's /columns attribute.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block myblock&amp;gt;&lt;br/&gt;/ trials = [1-5 = sequence(a,b)]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial a&amp;gt;&lt;br/&gt;/ ontrialbegin = [values.start_a = script.elapsedtime]&lt;br/&gt;/ stimulusframes = [1=mytext]&lt;br/&gt;/ timeout = 1000&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial b&amp;gt;&lt;br/&gt;/ ontrialbegin = [values.start_b = script.elapsedtime; &lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; values.a_duration = values.start_b - values.start_a;]&lt;br/&gt;/ stimulusframes = [1=mytext]&lt;br/&gt;/ validresponse = (57)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ start_a = 0&lt;br/&gt;/ start_b = 0&lt;br/&gt;/ a_duration = 0&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text mytext&amp;gt;&lt;br/&gt;/ items = ("&amp;lt;%script.currenttrial%&amp;gt;")&lt;br/&gt;/ erase = false&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;data&amp;gt;&lt;br/&gt;/ columns = [date time subject group blocknum blockcode trialnum trialcode stimulusitem response latency correct values.a_duration]&lt;br/&gt;/ separatefiles = true&lt;br/&gt;&amp;lt;/data&amp;gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Tue, 10 Oct 2017 12:49:57 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: How to match stimulus presentation time</title><link>https://forums.millisecond.com/Topic22661.aspx</link><description>&lt;div data-id="22660" class="if-quote-wrapper" unselectable="on" data-guid="1507657198380"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="22660" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="22660" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="22660" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Tuesday, October 10, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-22660"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;br/&gt;I think the clearest measure you can get of a trial's actual duration is to (1) store script.elapsedtime in a variable /ontrialbegin in trial "A" (the 1st trial in the chain), (2) store script.elapsedtime in a variable /ontrialbegin in trial "B" (the 2nd trial in the chain), (3) calculating the difference B-A, and using the result in your further duration calculations. Does that make sense?&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="22660"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;Technically I already thought about something like that, but did now how to built it in Inquisit. So, yes this makes sense now. But would it also work to store elapsedtime at /ontrialbegin in trial A, store a second variable of elapsedtime at /ontrialend of trial A and calculate the difference to be more precise (and more flexible with filler trials in between)? &lt;br/&gt;And as follow up question: Is there a way to save/read this information of real trialduration to/from the standard output file?&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Tue, 10 Oct 2017 10:51:03 GMT</pubDate><dc:creator>MartE</dc:creator></item><item><title>RE: How to match stimulus presentation time</title><link>https://forums.millisecond.com/Topic22660.aspx</link><description>&lt;div data-id="22658" class="if-quote-wrapper" unselectable="on" data-guid="1507656041442"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="22658" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="22658" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="22658" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;MartE - Tuesday, October 10, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-22658"&gt;&lt;div class="if-quote-message-margin"&gt;Hi Dave,&lt;br/&gt; I have a question regarding how to optimally match stimulus presentation time based on former presentation time.&lt;br/&gt; In the task, a target stimulus is presented (screen 1). Next, participants see two stimuli (screen 2). One is the former target. Participants have to decide on which side the target was. After pressing a button, the stimuli disappear. Afterwards a new stimulus should be presented for as long as the participant saw either the target or the distractor in sum (screen 3). This means, the stimulus on the third screen (neutral) should be presented either the time screen 1 and screen 2 where presented OR the time only screen 2 was presented&lt;br/&gt; &lt;br/&gt; My problem now is that I am not sure how to get the proper time. As the time the stimuli are displayed depends on the monitor refresh rate, which property takes this into account?&lt;br/&gt; The latency measures the time from stimulus onset to response (or timeout if no response), but does not take into account, that after a response within a frame the picture can still be presented for a couple of milliseconds to finish the frame.&lt;br/&gt; The timeout seems &amp;nbsp;to take also other processes into account (trial preparation etc.). And the timeout also seems not to take into account that a frame is not finished when timeout occurs.&lt;br/&gt; &lt;br/&gt; Do I have to specify the numframes to be exact? But than I would have to calculate the number of frames based on each monitor (if there are differences). Or do I have to add a blank filler stimulus to get the stimulusonset for that and use this?&lt;br/&gt; &lt;br/&gt; Code example:&lt;br/&gt; &amp;lt;trial present&amp;gt;&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / ontrialbegin = [values.target=list.target.nextvalue; values.distractor=list.distractor.nextvalue; values.neutral=list.neutral.nextvalue]&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / ontrialbegin = [values.target_hpos=50%]&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / stimulustimes = [0= target, present_text]&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / timeout = 1000&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / beginresponsetime = 0&lt;br/&gt; &amp;lt;/trial&amp;gt;&lt;br/&gt; &amp;lt;trial comp_T&amp;gt;&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / ontrialbegin = [values.target_hpos=list.2pos.nextvalue;&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; values.distractor_hpos=list.2pos.nextvalue; ]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / inputdevice = keyboard &lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / validresponse = (30, 38)&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / responsemode = free&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / stimulustimes = [0= target, distractor]&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / beginresponsetime = 0&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / iscorrectresponse = [values.target_hpos &amp;gt;50% &amp;amp;&amp;amp; trial.comp_T.response == 38]&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / iscorrectresponse = [values.target_hpos &amp;lt;50% &amp;amp;&amp;amp; trial.comp_T.response == 30]&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / ontrialend = [if ((values.target_hpos &amp;lt;50% &amp;amp;&amp;amp; trial.comp_T.response == 38)||(values.target_hpos &amp;gt;50% &amp;amp;&amp;amp; trial.comp_T.response == 30)) {values.incorrect = TRUE}]&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / ontrialend = [values.duration = trial.comp_T.latency + trial.present.timeout]&lt;br/&gt; &amp;lt;/trial&amp;gt;&lt;br/&gt; &amp;lt;trial comp_D&amp;gt;&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / ontrialbegin = [values.target_hpos=list.2pos.nextvalue;&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; values.distractor_hpos=list.2pos.nextvalue; ]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / inputdevice = keyboard &lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / validresponse = (30, 38)&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / responsemode = free&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / stimulustimes = [0= target, distractor]&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / responsetime = 0&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / iscorrectresponse = [values.target_hpos &amp;gt;50% &amp;amp;&amp;amp; trial.comp_D.response == 38]&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / iscorrectresponse = [values.target_hpos &amp;lt;50% &amp;amp;&amp;amp; trial.comp_D.response == 30]&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / ontrialend = [if ((values.target_hpos &amp;lt;50% &amp;amp;&amp;amp; trial.comp_D.response == 38)||(values.target_hpos &amp;gt;50% &amp;amp;&amp;amp; trial.comp_D.response == 30)) {values.incorrect = TRUE}]&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / ontrialend = [values.duration = trial.comp_D.latency]&lt;br/&gt; &amp;lt;/trial&amp;gt;&lt;br/&gt; &amp;lt;trial neutral&amp;gt;&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / ontrialbegin = [if( values.cond == "target_comp" || values.cond == "choice_comp_T") {values.duration = trial.comp_t.latency + trial.present.latency}]&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / ontrialbegin = [if( values.cond == "distractor_comp" || values.cond == "choice_comp_D") {values.duration = trial.comp_d.latency}]&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / ontrialbegin = [values.neutral_hpos=50%]&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / stimulustimes = [0= neutral, clearing]&lt;br/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / timeout = values.duration&lt;br/&gt; &amp;lt;/trial&amp;gt;&lt;br/&gt; &lt;br/&gt; Thanks!&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="22658"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;I think the clearest measure you can get of a trial's actual duration is to (1) store script.elapsedtime in a variable /ontrialbegin in trial "A" (the 1st trial in the chain), (2) store script.elapsedtime in a variable /ontrialbegin in trial "B" (the 2nd trial in the chain), (3) calculating the difference B-A, and using the result in your further duration calculations. Does that make sense?&lt;br/&gt;</description><pubDate>Tue, 10 Oct 2017 10:24:05 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>