It seems the measurement is only refreshed every 3-4 seconds. Is there a way to speed up grabbing a new measurement when needed? It processes in about 250ms on my computer.
I’ve seen the Sanderling.InvalidateMeasurement() and Sanderling.WaitForMeasurement() functions, but I don’t understand their use.
I’m hoping to get faster measurements so I can see when a rat is dead and my fighters don’t sit still after killing a rat and get hit by battleship rats.
Yes, you can do this with Sanderling.InvalidateMeasurement().
If you write a loop which just calls this function and then reads from Sanderling.MemoryMeasurement, then you will see several new measurements per second in the API Explorer.
The code would look like this: