recording current experimental time

Tobias tobias.fw at gmail.com
Mon Jul 11 17:37:02 UTC 2011


Thanks Peter!

That command and your suggested syntax perfectly worked out. Now I
know which part of my code was so time consuming.
However, I am not sure if I can reduce the timing and still I don't
know why the loading time differs so much between computers.

Here is the crucial part of the code:



for i = 1 to 101
'matrix positions
		Set ResponseMask_SlideImage = New SlideImage
		ResponseMask_SlideImage.Name = "Image" & i
		InitSlideImageDefaults ResponseMask_SlideImage
		ResponseMask_SlideImage.X = "104 " + ((i-1) mod 10)*48
		ResponseMask_SlideImage.Y = "24" + ((i-1) \ 10)*48
		ResponseMask_SlideImage.Width = "40"
		ResponseMask_SlideImage.Height = "40"
		ResponseMask.States.Item("Default").Objects.Add
ResponseMask_SlideImage, "Image" & i

Select Case ResponseMask.ActiveState
Case "Default"

		Set ResponseMask_SlideImage =
CSlideImage(ResponseMask.States.Item("Default").Objects(i))
		ResponseMask_SlideImage.Filename = "Mask.bmp"
		if i = 1 then ResponseMask_SlideImage.Filename = "fixation.bmp"
		ResponseMask_SlideImage.Load
		Set ResponseMask_SlideImage = Nothing


end select
next i



Especially the "ResponseMask_SlideImage.Load" takes 5-8 ms. As I have
a display of 100 elements this adds up to almost a second. However,
there are only two types of stimuli, so maybe there is way that the
two bitmaps are loaded once each but "built up" on all 100 positions?

Any clue why loading time differs so much between computers with
comparable hardware?

Thanks a lot in advance!
Best,
Tobias


On 11 Jul., 17:57, Peter Quain <pqu... at une.edu.au> wrote:
> in the e-basic help look up: Clock.Read. It is ms since start of the
> script. You can store value in variables and compute various
> durations if you want.
>
> Example:
> 'Make some Global Variables (in 'User' Tab)
> Dim time1, time2, dur1 as Long
> 'At some later time in your script, grab time since script started
> time1 = Clock.Read
> '[.... some more part of your experiment ....]
> 'Grab time since script started
> time2 = Clock.Read
> 'Compute interval, time1 to time2
> dur1 = time2 - time1
>
> At 01:39 AM 12/07/2011, you wrote:
>
> >Hi together,
>
> >I programmed an experiment in which a lot of positions and stimuli
> >have to be calculated online. Calculation of slides happens BEFORE
> >they are executed. Interestingly, this can cause a delay of up to 5
> >sec (not ms!) for some computer, 2 sec for other computers and only 1
> >sec on a third computer. Importantly, these computers are comparable
> >regarding their hardware, i.e. processor, RAM etc.
>
> >To test what exactly takes E-Prime so long under some circumstances,
> >Iw ould like to measure the experimental time at several points in
> >time during a single trial. So I can find out which part of the
> >programming should be optimized or if there's even an error I don't
> >recognize.
>
> >Therefore I would like to have, let's say 10 attributes and assign 10
> >times the current run time to one of these attributes. Unfortunately I
> >couldn't find the right command for this operation in the manual.
>
> >Does any of you know how I could do so? Or did sth similar (i.e. this
> >delay) happen to one of you?
>
> >Best,
> >Tobias
>
> >--
> >You received this message because you are subscribed to the Google
> >Groups "E-Prime" group.
> >To post to this group, send email to e-prime at googlegroups.com.
> >To unsubscribe from this group, send email to
> >e-prime+unsubscribe at googlegroups.com.
> >For more options, visit this group at
> >http://groups.google.com/group/e-prime?hl=en.

-- 
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com.
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.



More information about the Eprime mailing list