Looks like a common cathode display to me.
So three options:
Write your own multiplex code as Jack suggests.
Method 1: one cathode low and one anode high at a time, cycye thru all 40 LEDs. Can get by with just 1 resistor for each common cathode.
Method 2: all anodes high/low as needed while one cathode is low. Need a resistor per anode instead. Cycle thru all 5 digits. Will result in brighter display.
Option 3: Use MAX7221/7219, it controls the multiplexing. Can use a library (the one referenced bit-bangs out the data), or write your own code. Write to 4-5 registers in void setup after turning on SPI, uses '328Ps SPI hardware, way faster.
Then in void loop, write to a register to change a digit.
I usually have an array that holds the 5 digits (in this case) that are manipulated by whatever your code is doing . When a digit is changed, I run the code that updates the display, such as:
digitalWrite (ssPin, LOW);
for (x=0; x<5; x=x+1){
SPI.transfer (fontArray[displayData[x]]);
}
digitalWrite (ssPin, LOW);
fontArray[] will hold the fonts for the characters to be displayed
fontArray[] = {
B00111111, // 0
B00000110, // 1
etc with a 1 bit = an On segment
with Bit 7-6-5-4-3-2-1-0 representing DP-G-F-E-D-C-B-A
and the segment locations defined as
A
F B
G
E C
D DP
and displayData[] holds the 5 digits you are using for time, etc.