Hi Henkka,
if you don't need very high accuracy, my usual solution is
calculating the time when I want to do some action minus the real
time, and waiting for this time difference.
t=getTime();
for (i=0;i<220;i++) {
run("URL...", "url=
http://xxx.xxx.x.xxx/jpg/image.jpg");
t+=1000;
waitingTime = t-getTime();
if (waitingTime>0) wait(waitingTime);
else print("Too late by "+(-waitingTime)); //optional, show if
it's too slow
}
Michael
________________________________________________________________
On 4 Mar 2010, at 14:40, Henkka wrote:
> Hi all,
>
> Im importing a series of pictures via network camera and creating a
> stack
> for further analysis. The problem is that the frame interval is not
> steady.
> My goal is to get constant 1 fps but the framerate changes from 1-
> ~0.3 fps.
>
> Im using this set of macro:
>
> setBatchMode(true)
>
> for (i=0;i<220;i++)
> {
> run("URL...", "url=
http://xxx.xxx.x.xxx/jpg/image.jpg");
> wait(1000);
> }
>
> setBatchMode("exit and display")
>
> run ("Images to Stack", "title=image");
>
> Any help is much appreciated!
>
> -H