void setup() {
  Serial.begin(115200);
  Serial.println("Hello, ESP32!");

  long int t1 = millis();
  long int t2 = t1 + 5*1000;

  Serial.print("Now: ");Serial.println(t1);
  while(t1 < t2) {
    t1 = millis();
  }
  Serial.print("Now: ");Serial.println(t1);
}

void loop() {
  delay(1000); // this speeds up the simulation
}