I want to know if there is an efficient way to make bigger calculations over multiple frames.

In a project, where I'm currently working on, I need to do some bigger calculations which take almost half a second ore more. right now I spread them with a loop which only does X repetitions.

example:

```
var x = 10 #process steps per frame
var curent_process_state = 0
for i in range(x):
#calculate longer process
liste[i + current_process_state].calculate_time_consuming_function()
current_process_state += x
```

This kind of works but I have to approximate a value for x so that the game runs smooth.

It would be great if I could do it like:

```
func myFunc():
for e in list:
e.calculate_time_consuming_function()
execute myFunc for 0.02 seconds
```

Is there a way to do so in GDscript?