﻿<?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 3  » How to record time - not duration - of stimulus onset?</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Fri, 18 Sep 2026 22:51:38 GMT</lastBuildDate><ttl>20</ttl><item><title>How to record time - not duration - of stimulus onset?</title><link>https://forums.millisecond.com/Topic12274.aspx</link><description>Hello. &lt;div&gt;&lt;br/&gt;&lt;/div&gt;We want to supervise by video if a participant has really observed the presented stimulus. Therefore, we need the time, when the stimulus was presented.&lt;div&gt;&lt;br/&gt;&lt;/div&gt;With "stimulusonset" it´s only possible to record the milliseconds after the trail began - thus, a kind of hold-up effect control. &lt;div&gt;&lt;br/&gt;&lt;/div&gt;But we need the time - in terms of time of day (10:12:13) or the milliseconds, counted scine the beginning of the whole experiment.&lt;div&gt;&lt;br/&gt;&lt;/div&gt;&lt;div&gt;&lt;br/&gt;&lt;/div&gt;Who can help? &lt;div&gt;&lt;div&gt;&lt;br/&gt;&lt;/div&gt;Thank you, Marieke&lt;br/&gt;&lt;/div&gt;&lt;div&gt;&lt;br/&gt;&lt;/div&gt;&lt;br/&gt;</description><pubDate>Wed, 23 Apr 2014 00:39:02 GMT</pubDate><dc:creator>marieke_01</dc:creator></item><item><title>RE: How to record time - not duration - of stimulus onset?</title><link>https://forums.millisecond.com/Topic13087.aspx</link><description>Actually that does not help much. If I find&lt;div&gt;&lt;br/&gt;&lt;/div&gt;script.currenttime&amp;nbsp;&amp;nbsp; script.elapsedtime&lt;div&gt;12:13:23 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 41291&lt;div&gt;12:13:33 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 51391&lt;div&gt;&lt;br/&gt;&lt;/div&gt;in my logfile, I know that the trial startet at second 23 and lastet for exactly 10 seconds. However, I don't know exactly when it started. That's to unprecise to sync it with a videorecording of 30 fps which records a frame every 33 ms.&lt;div&gt;&lt;div&gt;&lt;br/&gt;&lt;/div&gt;My workaround-solution is to wait for a "full" second:&lt;div&gt;&lt;br/&gt;&lt;/div&gt;------------------------------------&lt;div&gt;### Start experiment-block if second is "full"&lt;br/&gt;### (Inquisit 3.0.6.0)&lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ subjects = (1 of 1)&lt;br/&gt;/ blocks = [1=loopfullsecond]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ beginningSecond = script.currenttime&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;#########################&lt;br/&gt;### "full second" loop&lt;br/&gt;#########################&lt;br/&gt;&lt;br/&gt;&amp;lt;block loopfullsecond&amp;gt;&lt;br/&gt;/ branch = [if (script.currenttime &amp;gt; values.beginningSecond) block.experiment]&lt;br/&gt;/ branch = [if (script.currenttime == values.beginningSecond) block.loopfullsecond]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;#########################&lt;br/&gt;### Experiment starts&lt;br/&gt;#########################&lt;br/&gt;&lt;br/&gt;&amp;lt;block experiment&amp;gt;&lt;br/&gt;/ trials = [1=experiment]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial experiment&amp;gt;&lt;br/&gt;/ stimulustimes = [0 = experiment,currenttime1,currenttime2,elapsedtime1]&lt;br/&gt;/ timeout = 5000&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text experiment&amp;gt;&lt;br/&gt;/ items = experiment&lt;br/&gt;/ valign = center&lt;br/&gt;/ halign = center&lt;br/&gt;/ position = (50%, 50%)&lt;br/&gt;/ txcolor = (0,0,0)&lt;br/&gt;/ fontstyle = ("Arial", 5%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text currenttime1&amp;gt;&lt;br/&gt;/ items =&amp;nbsp; ("Script start second: &amp;lt;% values.beginningSecond %&amp;gt;")&lt;br/&gt;/ position = (50%, 60%)&lt;br/&gt;/ halign = center&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text currenttime2&amp;gt;&lt;br/&gt;/ items =&amp;nbsp; ("Current time: &amp;lt;% script.currenttime %&amp;gt;")&lt;br/&gt;/ position = (50%, 70%)&lt;br/&gt;/ halign = center&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text elapsedtime1&amp;gt;&lt;br/&gt;/ items = ("Elapsed time (should be lower than 1000): &amp;lt;% script.elapsedtime %&amp;gt;")&lt;br/&gt;/ position = (50%, 80%)&lt;br/&gt;/ halign = center&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item experiment&amp;gt;&lt;br/&gt;/1 = "Experiment starts"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;/div&gt;&lt;item experiment=""&gt;&lt;/item&gt;------------------------------------&lt;div&gt;&lt;br/&gt;&lt;/div&gt;The script itself seems to need about 32ms to get up and running on my machine (measured with a very simple script and script.elapsedtime). That's an offset of one frame and acceptable/assessable for me. Nevertheless, a more precise timestamp would be very useful ;-)&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description><pubDate>Wed, 23 Apr 2014 00:39:02 GMT</pubDate><dc:creator>juhaso</dc:creator></item><item><title>RE: How to record time - not duration - of stimulus onset?</title><link>https://forums.millisecond.com/Topic13046.aspx</link><description>No. The currenttime property does not provide milliseconds. elapsedtime, however, is provided in milliseconds, so if need be you could conceivably combine the two (using math via expressions).&lt;br/&gt;</description><pubDate>Thu, 17 Apr 2014 07:49:14 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: How to record time - not duration - of stimulus onset?</title><link>https://forums.millisecond.com/Topic13044.aspx</link><description>Thank you for the very nice possibility, to include a timestamp of the inquisit-events in the logfile via&lt;div&gt;&lt;br/&gt;&lt;/div&gt;&amp;lt;data&amp;gt;&lt;div&gt;&lt;div&gt;/ colums =[...,script.currenttime,...]&lt;div&gt;&amp;lt;/data&amp;gt;&lt;div&gt;&lt;br/&gt;&lt;/div&gt;However, to synchronize inquisit-events very accurately with an externally recorded video (with timestamps) it would be very useful to have a inquisit-timestamp including milliseconds, e.g., in the format hh:mm:ss:xxx where xxx are the milliseconds. Is there any possibility to have that?&lt;br/&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description><pubDate>Thu, 17 Apr 2014 07:31:11 GMT</pubDate><dc:creator>juhaso</dc:creator></item><item><title>RE: How to record time - not duration - of stimulus onset?</title><link>https://forums.millisecond.com/Topic12275.aspx</link><description>You'll want to make use of the applicable 'currenttime' and/or 'elapsedtime' property to record a timestamp /ontrialbegin, log that to the data file and then add stimulusonset to the timestamp to approximate absolute starting time for the given stimulus.</description><pubDate>Wed, 05 Feb 2014 09:18:32 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>