Code blocking despite using millis()

Hello. I've written code that periodically updates data on an OLED, and I have an ISR that changes the type of data displayed to the screen when pressed. However, my ISR always waits until the the condition for the desired amount of time passed is met.

Here is my loop, where 'TIME_SKEW' is the amount of time in milliseconds desired to wait, and 'timeThreshold', which represents the future time to update the screen:

void loop() {
  if(millis() > timeThreshold) {
    readBmeSensor();
    updateOledDisplay();
    timeThreshold = (millis() + TIME_SKEW);
  }
}

And the ISR which changes the data by updating 'displayState' and redisplaying:

void toggleOledDisplay() {
  displayState++;
  displayState %= TOTAL_STATES;

  inline void readBmeSensor();
  inline void updateOledDisplay();
}

The two functions to read data and write to the screen are here below:

/*
 * Read sensor based on the value of displayState.
 */
void readBmeSensor() {
  if(displayState == DISPLAY_STATE_TEMP) {
    sensorData = bme.readTemperature();
  }
  else if(displayState == DISPLAY_STATE_HUM) {
    sensorData = bme.readHumidity();
  }
  else if(displayState == DISPLAY_STATE_PRES) {
    sensorData = bme.readPressure();
  }
}

/*
 * Update screen
 */
void updateOledDisplay() {
  display.clearDisplay();
  display.setCursor(0,0); 
  display.print(sensorData);
  display.print(units[displayState]);
  display.display();
}

What am I not understanding? Thank you.

How about doing something a bit different

make a global volatile variable as a trigger in the ISR

bool MeMeReadyToDoTheThings_0 = false;


void toggleOledDisplay() {

if ( !MeMeReadyToDoTheThings_0 )
{
MeMeReadyToDoTheThings_0= true;
}

}

void loop() {

if( MeMeReadyToDoTheThings )
{
 inline void readBmeSensor();
  inline void updateOledDisplay();
MeMeReadyToDoTheThings_0= false;

}

}

Your ISR is not calling readBmeSensor() and not calling updateOledDisplay(). Those are function declarations, not invocations.

This is actually a good thing since you do not want to be calling these functions within your ISR but rather follow the advice of Idahowalker and just set a flag and then act upon that flag in your main loop.

You should also not be using 'future time' but only current time - a past time since that is what makes unsigned math work

volatile bool updateFlag = false;
unsigned long prevTime;

void loop() {
  if ( udpateFlag ) {
    displayState = (displayState+1) % TOTAL_STATES;
  }
  if(millis() - prevTime >= timeThreshold || updateFlag) {
    readBmeSensor();
    updateOledDisplay();
    prevTime += TIME_SKEW;
    updateFlag = false;
  }
}

void toggleOledDisplay() {
  updateFlag = true;
}
  inline void readBmeSensor();
  inline void updateOledDisplay();

These two lines in your ISR are not function calls. They are "forward declarations" or "prototypes". They won't call the functions. To do that, remove the declaration parts:

  readBmeSensor();
  updateOledDisplay();