How do I make an AsyncTask that run for several seconds before it returns a value?

Hi all,

I’d like to know how to make an Task that respects the length of time it may take for a calculation to be made. It feels like something I would like to do all the time to modularize more of my code.

I want to run a certain command for x seconds and return the result of that computation. If I press Trigger it will only show the result from the first frame. So how do I introduce a waiting time to this task?

callmenames-2022-01-26-Application_2022.01.26-14.44.25

image

you can use Task.Delay and then a Wait for that delay task.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.