Press the green flag. Drag the black ball around. It will travel at the average speed as when you were dragging it. It will keep on going until it hits a side. You can drag it while it is moving.
It took me a suprising amount of time to develop it. To avoid any bugs, try to drag it in the same direction. It only measures the start point (when you start dragging) and end point (when you drop it).