display a variable in 4 digit 7 segment LED light.

Hi, I am very new to Arduino as well as electronics. I have a 4 digit 7 segment light and want to display a variable in it. The issue is the LED light keeps refreshing, so I wrote a timer to stop it but it does not work properly. I think it is to do with the sevseg library how it wrote. Please help. Thanks

#include "SevSeg.h"
int reading;
int tempPin = 0;
float tempC;
unsigned long StartTime = millis();
SevSeg sevseg; //Initiate a seven segment controller object

void setup() {
analogReference(INTERNAL);
Serial.begin(9600);
byte numDigits = 4;

byte digitPins[] = {2, 3, 4, 5};

byte segmentPins[] = {6, 7, 8, 9, 10, 11, 12, 13};

sevseg.begin(COMMON_ANODE, numDigits, digitPins, segmentPins);

sevseg.setBrightness(90);

}

void loop() {

unsigned long CurrentTime = millis();
unsigned long ElapsedTime = CurrentTime - StartTime;

//timer used to control the display in every two seconds
if(ElapsedTime > 2000){
  tempC = tempRequest();

sevseg.setNumber(tempC, 2);
sevseg.refreshDisplay(); // Must run repeatedly
StartTime = CurrentTime;

}



}

float tempRequest()
{

  reading = analogRead(tempPin);
  tempC = reading / 9.31;
  //delay(2000);
  return tempC;
}