That library is very old, over 7 years. It is possible that you may need to use the ESP32 board package, as well as the Adafruit_GFX and WiFi libraries, that were available at that time to get it to work as expected, although I think that is highly unlikely to help. I can say for certain that it will not compile with the current version of the ESP32 board package.
There could be something about the specific display that was being used that behaves differently from your display, as @xfpd has pointed out.
As a test, see if the following sketch will run without blinking or skipping seconds. The double buffering may be requiring a very long time to update the entire display.
#include <WiFi.h>
#include <Adafruit_GFX.h>
#include <P3RGB64x32MatrixPanel.h>
#include <Fonts/FreeSansBold9pt7b.h>
// constructor with default pin wiring
P3RGB64x32MatrixPanel matrix;
char ssid[] = "Xxxxxxx";
char pass[] = "Xxxxxxxxxxxx";
#define TZ (-3*60*60) /*JST*/
time_t last_t;
const char* const wd[7] = {"Domingo", "Segunda", "Terca", "Quarta", "Quinta", "Sexta", "Sabado"};
void setup() {
Serial.begin(115200);
Serial.print("Attempting to connect to Network named: ");
Serial.println(ssid); // print the network name (SSID);
WiFi.begin(ssid, pass);
while (WiFi.status() != WL_CONNECTED) {
Serial.print(".");
delay(1000);
}
Serial.println("");
IPAddress ip = WiFi.localIP();
Serial.print("IP Address: ");
Serial.println(ip);
configTime(TZ, 0, "ntp.nict.jp", "ntp.jst.mfeed.ad.jp"); // enable NTP
matrix.begin(); // Configura a matriz de LEDs
initializeDisplay();
}
void initializeDisplay() {
matrix.fillScreen(0);
matrix.setFont(&FreeSansBold9pt7b);
matrix.setCursor(0, 13);
last_t = time(NULL);
struct tm* tm = localtime(&last_t);
matrix.setTextColor(matrix.color444(15, 15, 15));
matrix.printf("%02d:%02d", tm->tm_hour, tm->tm_min);
matrix.setFont();
matrix.printf(":%02d", tm->tm_sec);
}
void loop() {
time_t t;
struct tm *tm;
t = time(NULL);
if (last_t == t) return; // desenha cada segundo
char current[11];
char previous[11];
tm = localtime(&last_t);
struct tm tmPrev = *tm;
//struct tm tmPrev = *localtime(&last_t);
tm = localtime(&t);
if ((tmPrev.tm_hour != tm->tm_hour) || (tmPrev.tm_min != tm->tm_min)) {
sprintf(previous, "%02d:%02d", tmPrev.tm_hour, tmPrev.tm_min);
sprintf(current, "%02d:%02d", tm->tm_hour, tm->tm_min);
matrix.setFont(&FreeSansBold9pt7b);
matrix.setCursor(0, 13);
updateText(previous, current, matrix.color444(15, 15, 15), 0);
}
matrix.setFont();
matrix.setCursor(50, 7);
sprintf(previous, "%02d", tmPrev.tm_sec);
sprintf(current, "%02d", tm->tm_sec);
updateText(previous, current, matrix.color444(15, 15, 15), 0);
last_t = t;
//check WiFi connection status
const unsigned long statusCheckInterval = 30000; //30 seconds
static unsigned long previousMillis = millis() - statusCheckInterval;
if ((WiFi.status() != WL_CONNECTED) && ((millis() - previousMillis) >= statusCheckInterval)) {
Serial.println("WiFi connection lost, reconnecting...");
WiFi.disconnect();
WiFi.reconnect();
previousMillis = millis();
}
}
void updateText(const char* oldText, const char* newText, const uint16_t colorForeground, const uint16_t colorBackground) {
if (strlen(newText) != strlen(oldText)) {
return;
}
matrix.setTextColor(colorForeground);
while (*newText) {
if (*oldText != *newText) {
int cursorPosX = matrix.getCursorX();
int cursorPosY = matrix.getCursorY();
matrix.setTextColor(colorBackground);
matrix.print(*oldText);
matrix.setTextColor(colorForeground);
matrix.setCursor(cursorPosX, cursorPosY);
}
matrix.print(*newText);
oldText++;
newText++;
}
}