I have code that changes the color of an image when a touch screen on Windows 10 is touched. When the screen is touched I also have an external function that I call to toggle a GPIO pin on a board. My coworker ran some tests with an optical sensor to see the latency on the color changing. We always have 60+ fps. The code for the color change is before the code toggling the GPIO pin but the color change is actually occurring 100 ms after the GPIO pin is toggled(My coworker is using a program that shows him when the screen is touched, when the pin is toggled, and when the color change occurs). I tried calling Canvas.ForceUpdateAllCanvases and I also tried LayoutRebuilder.ForceRebuildLayoutImmediate but this did not affect the time taken for the actual color change to occur. Is there any way to reduce this latency? Am I doing something wrong somehow?