newbie: flickering 4 digits display

I run this code for reading out a voltage sensor, and outputting it to a 4 digit 7 segment display:

#include "SevSeg.h"

SevSeg sevseg; //Initiate a seven segment controller object
int analogInput = A1;
float vout = 0.0;
float vin = 0.0;
float R1 = 30000.0; //  
float R2 = 7500.0; // 
int value = 0;

void setup() {
  pinMode(analogInput, INPUT);
byte numDigits = 4;
byte digitPins[] = {2, 3, 4, 5};
byte segmentPins[] = {6, 7, 8, 9, 10, 11, 12, 13};

sevseg.begin(COMMON_CATHODE, numDigits, digitPins, segmentPins);
sevseg.setBrightness(90);
}

void loop() {

   value = analogRead(analogInput);
   vout = (value * 5.0) / 1024.0;
    vin = vout / (R2/(R1+R2)); 
   sevseg.setNumber(vin,2);
 sevseg.refreshDisplay(); // Must run repeatedly
}

The prblem is, the last 2 digits are flickering as the value will change often. How can i fix that?

try:

#include "SevSeg.h"

SevSeg sevseg; //Initiate a seven segment controller object
int analogInput = A1;
float vout = 0.0;
float vin = 0.0;
float R1 = 30000.0; //
float R2 = 7500.0; //
int value = 0;
unsigned long previousMillis;

void setup() {
  pinMode(analogInput, INPUT);
  byte numDigits = 4;
  byte digitPins[] = {2, 3, 4, 5};
  byte segmentPins[] = {6, 7, 8, 9, 10, 11, 12, 13};

  sevseg.begin(COMMON_CATHODE, numDigits, digitPins, segmentPins);
  sevseg.setBrightness(90);
}

void loop() {
  if (millis() - previousMillis >= 500)
  {
    previousMillis += 500;
    value = analogRead(analogInput);
    vout = (value * 5.0) / 1024.0;
    vin = vout / (R2 / (R1 + R2));
    sevseg.setNumber(vin, 2);
  }
  sevseg.refreshDisplay(); // Must run repeatedly
}

That does the job, thanks for you quick reply.