Way to splitting a second from timer?

hello, i have a timer that runs every second…
and it has 1000 jobs to do… on that second… every second…

which is very intensive…

i’m looking for a way to split the second to make it less intense…

like instead of every second…

i want to split the task on the timer like…

0ms to 200ms do job 1-200

201ms to 400ms do job 201-400

401ms to 600ms do job 401-600

601ms to 800ms do job 601-800

801ms to 1000ms do job 801-1000

this way, it is probably less intense because of the splitted task…

im just experimenting on this if it would work, but i am not sure if it would be…
i just thought, this way might be less intense every second…

I don’t think it’s going to make any difference, because you’re still doing everyting every second.

What are you trying to do that’s so intensive?

How about limiting your frame-rate to about 60 and and do 25 tasks each frame? Then you have a little buffer at the end where it can catch up if needed.

manually moving pawns to a new location by code…
it’s just an experiment, to see if it’s possible…
it’s working, but if i reach 800+ objects to move, it starts to get clunky…

hmm… how would i do that… “25 tasks in each frame” ?

Make a job list? I don’t know what the jobs are! What are they?

With tick. You dont need to limit framerate, you cna use delta time to calculate how much tasks to do on single frame

Well you would need to make queue system, you need to ocntain tasks in container TQueue would be a lot better then TArray (which is alos used for blueprint arrays):

There also no Push and Pop function in blueprint which makes queuing easier. If you have static number of tasks most optimize wya would be to do this without editing the array, and just execute tasks based on array index. Delta time that Tick outputs is time between frame, use that to decide how much tasks you should execute in specific tick (note that delta time is effected by time dilation), keep track of index of last executed task and continue excuting tasks on next tick. The normal loop node have first and last index inputs, on first pu current index + 1 and at last Current index + number of tasks to do in tick at the end save the last index of task executed.

and how is that done in blueprints?