What is the best method of multiplexing a display, while still being able to do other things? For example, reading my RTC and listening for button presses while running though a 4 digit display. The only thing I can think of is to put the display in a for loop, or while loop and give it about 50 rolls or so before going through the rest of my required code for updates. And the button listening could go with the multiplexing loop.
Is there a more practical, or common way?