In this recipe, we will enhance the code in the last recipe in such a way as to add visual feedback each time we start the operation of fetching the weather data for a particular city. The first part of this recipe is to take some measurements to find out how slow the show_weather function is. This will give us a sense of whether the function is slow enough that it would be visible to a user.
Then, we will use the invert feature on the display to provide immediate visual feedback that we have started fetching weather data. This recipe will help you as a real-life example of the performance challenges you can face with the hardware constraints of microcontrollers and how you can overcome them at times to provide some sort of feedback to the users of your application.