softwareserial unnecessary delay when writeing to custom serial

Im having a clock, that resets by pressing a button, but the clock timer isnt 1 second, and it has something to do with the “pernilleSerial” when writing, but i dont know how to fix the delay it takes for it to write to the clock

/*
 * (Danish) 
  Programeksempel til at sende til Pernillekittet.
  Der skal sendes en ID = 8B efterfulgt af to bytes, tal fra 0 til 9
  RX is digital pin 10 (connect to TX of other device) !! Vigtigt!
  TX is digital pin 11 (connect to RX of other device) !! Vigtigt!
  Revideret af Daniel Munk: 13-11-2013
*/

const int knap = 2;

#include <SoftwareSerial.h>

SoftwareSerial pernilleSerial(10, 11); // RX, TX ( kald evt. mySerial for pernilleSerial i stedet )
byte rx = 10; // Pins for RxD, Recieve Data,
byte tx = 11; // Pin for TxD, Transmit Data.
byte _10ere; // Variabel for 10's
byte _1ere; // Variabel for 1's

// Generally, you should use "unsigned long" for variables that hold time
// The value will quickly become too large for an int to store
unsigned long previousMillis = 0;

// constants won't change:
const long interval = 1000;           // interval at which to blink (milliseconds)

boolean skriv = 0;

void setup()
{
  Serial.begin(9600); // Open serial communications and wait for port to open:
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }
  // pinMode(rx,INPUT);
  pinMode(tx, OUTPUT);
  pinMode(knap, INPUT);
  digitalWrite(tx, HIGH);
  delay(100);
  Serial.println("Hej!"); // i Debug vinduet:
  pernilleSerial.begin(1200); // set the data rate for the SoftwareSerial port
  delay(100);
}
void loop() // run over and over
{
  if (digitalRead(knap) == HIGH) {
    _10ere = 0;
    _1ere = 0;
    Serial.println("DUT!");
  }
  if (skriv == 1) {
    pernilleSerial.write( 0x8B ); // ID for Pernille
    pernilleSerial.write ((byte)_10ere); // 10ere sendes (byte skal skrives fordi 00h ikke kendes)
    pernilleSerial.write ((byte)_1ere); // 1ere sendes (byte skal skrives fordi 00h ikke kendes)
  }
  Serial.print(_10ere);
  Serial.println(_1ere);
  if ((millis() - previousMillis) >= interval) {
    // save the last time you blinked the LED
    previousMillis = millis();

    _1ere++;
    if (_1ere > 9) {
      _1ere = 0;
      _10ere++;
      if (_10ere > 9) {
        _10ere = 0;
      }
    }
    skriv = 1; // write in danish
  }


  // Serial.print(i);
  // Serial.println(t);


}

I don't see any avoidable delay in between pressing the button and sending the message other than the line

Serial.println("DUT!");

It seems that your variable skriv always has the value 1 and that might mean that the program is sending data to the clock so often that the software serial output buffer is full and causes a delay

...R

It worked didnt see, that "skriv" was 1 all the time, so i changed:

 if (skriv == 1) {
    pernilleSerial.write( 0x8B ); // ID for Pernille
    pernilleSerial.write ((byte)_10ere); // 10ere sendes (byte skal skrives fordi 00h ikke kendes)
    pernilleSerial.write ((byte)_1ere); // 1ere sendes (byte skal skrives fordi 00h ikke kendes)
    skriv = 0;