First of all, you have a while(true) in your loop, that makes no sense. The loop already loops for ever.
You are also changing the number every time the loop() is run, making it flicker. If you follow the Arduino library example, you can see they only use setNumber every so often and use refreshDisplay every time the code runs through the loop().
Also, you didn't setBrightness, which shouldn't be a problem since the library probably sets a default value, but I'd advise on including it in your code to eliminate unforeseen problems.
Try this code and let me know if it works:
#include "SevSeg.h"
SevSeg sevseg1; //Instantiate a seven segment controller object
SevSeg sevseg2;
void setup() {
byte numDigits = 4;
byte digitPins1[] = {2, 3, 4, 5};
byte segmentPins1[] = {6, 7, 8, 9, 10, 11, 12, 13};
byte digitPins2[] = {14, 15, 16};
byte segmentPins2[] = {17, 18, 19, 20, 21, 22, 23, 24};
sevseg1.begin(COMMON_ANODE, numDigits, digitPins1, segmentPins1);
sevseg1.setBrightness(90);
sevseg2.begin(COMMON_ANODE, numDigits, digitPins2, segmentPins2);
sevseg2.setBrightness(90);
}
void loop() {
static unsigned long timer = millis();
static int deciSeconds = 0;
if (millis() >= timer) {
deciSeconds++; // 100 milliSeconds is equal to 1 deciSecond
timer += 100;
if (deciSeconds == 10000) { // Reset to 0 after counting for 1000 seconds.
deciSeconds=0;
}
sevseg1.setNumber(deciSeconds, 1);
sevseg2.setNumber(deciSeconds, 1);
}
sevseg1.refreshDisplay(); // Must run repeatedly
sevseg2.refreshDisplay(); // Must run repeatedly
}