Transfer parameter-value from loop to function

If matchtime is a global variable then its value will be available throughout the sketch so there is no need to transfer its value to a function that you call.

However, in your sketch you have more than one variable named matchtime
In loop(), so only available in loop()

        int matchtime = 5000; // 5s testing time for this type

As a global

int matchtime = 100;

So available throughout the sketch

The global version will be set when you do this

void matching()
{
  matchtime = digitalRead(matchtime);
  Serial.print("zeit=");
  Serial.print(matchtime);
}

Note also that if you want to use matchtime as some kind of timing variable then setting its value to the state of a pin using digitalRead() is not going to be of much use