Is it possible to flash leds on robot to show us there are 40 minutes left for the match
I would use the getMatchTime() method. It’s not guaranteed to be 100% accurate, but it should be close enougg for this purpose.
Use the practice mode on the Driver Station to simulate a match to determine if the values that method returns are what you want to use.
I don’t think that matches are longer than 2:30.