Jump to content

How do I delay the execution of any method


photo

Recommended Posts

  • 8 months later...
On 4/4/2022 at 11:36 PM, Tessalator said:
await Task.Delay(1000); //1 sec.

Hello, hate to be a bother but Unigine tells me that 'Task' doesn't exist in the current context (been trying for ages to find a debounce method).

Link to comment

Do you have a reference to System.Threading?

I don't know that Tasks (used like above) would be good for things like debounce. You could be spinning up a lot of threads.
Rohit's Spin Locks, etc. are lower level and better suited.

Edited by Tessalator
Link to comment
×
×
  • Create New...