Hello again,
I have now as far as hinbekommen the stopwatch with the 2 times myself 
Unfortunately, work output, which is located in the Sketch under f_display not 100%.
What I lack, or what I is not got done, I would like the time is stopped at the time show.
So not the time the degree is still running show, but the stopped
Thank you apologize in advance
Markus1995
boolean timerActive[2]; // 2 Timer aktiv true/false
long timerStartTime[2]; // 2 Startzeiten in Millisekunden
long timerTime[2]; // 2 Zählerstände in Millisekunden
byte nextStartTimer;
byte nextStopTimer;
#define STARTBUTTON 6
#define STOPBUTTON 5
static byte startButtonState;
static byte stopButtonState;
byte state;
byte state1;
int segdisp[10] = {
63,6,91,79,102,109,125,7,127,111 }; //segment references using 74HC595 Shift Registers
//The above numbers light up different segments of a digit
unsigned long currentmicros1;
unsigned long previousmicros1;
unsigned long interval = 10000;
unsigned long elapsedmicros1;
unsigned long elapsedmicros2;
unsigned long currentmicros2;
unsigned long previousmicros2;
byte latchpin = 8; // connect to pin 12 on the 74HC595
byte clockpin = 52; // connect to pin 11 on the 74HC595
byte datapin = 51; // connect to pin 14 on the 74HC595
byte hundredths1;
byte tenths1;
byte ones_seconds1;
byte tens_seconds1;
byte ones_minutes1;
byte hundredths2;
byte tenths2;
byte ones_seconds2;
byte tens_seconds2;
byte ones_minutes2;
byte start_button_state = 0;
byte start_button = 6;
byte stop_button_state = 0;
byte stop_button = 5;
byte running1 = 0;
byte running2 = 0; // was 'started'
byte time_update1;// added new flag
byte display_update1; // flag to indicate shiftouts are to occur
byte time_update2;// added new flag
byte display_update2; // flag to indicate shiftouts are to occur
void setup()
{
pinMode(latchpin, OUTPUT);
pinMode(clockpin, OUTPUT);
pinMode(datapin, OUTPUT);
pinMode(start_button, INPUT);
digitalWrite (start_button, HIGH); // enable pullup
pinMode(stop_button, INPUT);
digitalWrite (stop_button, HIGH); // enable pullup
}
void loop()
{
// when started flag is pressed, start counting in 10mS increments)
if (timerActive[0]==true){
currentmicros1 = micros(); // read the time
elapsedmicros1 = currentmicros1 - previousmicros1;
if (elapsedmicros1 >= interval) // 10 milliseconds have gone by
{
previousmicros1 = previousmicros1 + elapsedmicros1; // save the time for the next comparison
time_update1 = 1; // set flag to shift out the new time
}
if (time_update1 == 1){ // no updating if not at 10ms interval, skip this whole section
// increment the counters, roll as needed, shift the digits out
time_update1 = 0; // reset for next pass thru
hundredths1 = hundredths1 +1;
if (hundredths1 == 10){
hundredths1 = 0;
tenths1 = tenths1 +1;
}
if (tenths1 == 10){
tenths1 = 0;
ones_seconds1 = ones_seconds1 +1;
//Serial.print (ones_seconds, DEC);
//Serial.print (" ");
}
if (ones_seconds1 == 10){
ones_seconds1 = 0;
//Serial.println ("");
hundredths1 = hundredths1 +3; // Speed up the clock!
tens_seconds1 = tens_seconds1 +1;
}
if (tens_seconds1 == 6){
tens_seconds1 = 0;
hundredths1 = hundredths1 +6; // Speed up the clock!
ones_minutes1 = ones_minutes1 +1;
}
if (ones_minutes1 == 10){
ones_minutes1 = 0;
}
display_update1 = 1;
} // end if time to be updated
} // end of if-started[]
if (timerActive[1]==true){
currentmicros2 = micros(); // read the time
elapsedmicros2 = currentmicros2 - previousmicros2;
if (elapsedmicros2 >= interval) // 10 milliseconds have gone by
{
previousmicros2 = previousmicros2 + elapsedmicros2; // save the time for the next comparison
time_update2 = 1; // set flag to shift out the new time
}
if (time_update2 == 1){ // no updating if not at 10ms interval, skip this whole section
// increment the counters, roll as needed, shift the digits out
time_update2 = 0; // reset for next pass thru
hundredths2 = hundredths2 +1;
if (hundredths2 == 10){
hundredths2 = 0;
tenths2 = tenths2 +1;
}
if (tenths2 == 10){
tenths2 = 0;
ones_seconds2 = ones_seconds2 +1;
//Serial.print (ones_seconds, DEC);
//Serial.print (" ");
}
if (ones_seconds2 == 10){
ones_seconds2 = 0;
//Serial.println ("");
hundredths2 = hundredths2 +3; // Speed up the clock!
tens_seconds2 = tens_seconds2 +1;
}
if (tens_seconds2 == 6){
tens_seconds2 = 0;
hundredths2 = hundredths2 +6; // Speed up the clock!
ones_minutes2 = ones_minutes2 +1;
}
if (ones_minutes2 == 10){
ones_minutes2 = 0;
}
display_update2 = 1;
} // end if time to be updated
} // end of if-started[]
state=!digitalRead(STARTBUTTON);
if (state==HIGH && startButtonState==LOW)
{
if (timerActive[0]==false)
{ hundredths1 = 0;
tenths1 = 0;
ones_seconds1 = 0;
tens_seconds1 = 0;
ones_minutes1 = 0;
}
if (timerActive[1]==false)
{ hundredths2 = 0;
tenths2 = 0;
ones_seconds2 = 0;
tens_seconds2 = 0;
ones_minutes2 = 0;
}
if (timerActive[nextStartTimer]==false)
{
timerActive[nextStartTimer]=true;
timerStartTime[nextStartTimer]=millis();
nextStartTimer=(nextStartTimer+1)%2;
}
}
startButtonState=state;
state1=!digitalRead(STOPBUTTON);
if (state1==HIGH && stopButtonState==LOW)
{
if (timerActive[nextStopTimer]==true)
{
timerActive[nextStopTimer]=false;
nextStopTimer=(nextStopTimer+1)%2;
}
if (timerActive[1]==false)
{
nextStartTimer=0;
nextStopTimer=0;
}
delay(10); // Zeit zum Entprellen (entfällt bei "langsamer" loop-Funktion)
}
stopButtonState=state1;
int i=(millis()/3000)%2; // Welcher Timer ist zur Darstellung dran?
// Wenn nur ein Timer aktiv zählt, und der andere Timer steht, wird stets der stehende Timer angezeigt
if (timerActive[0]!=timerActive[1]) // Ist nur ein Timer aktiv?
{ // in dem Fall nur den inaktiven Timer darstellen
if (timerActive[0]) i=1; else i=0; // der stehende (andere) Timer wird angezeigt
}
if (display_update1 == 1 && i==1 || display_update2 == 1 && i==1){
digitalWrite(latchpin, LOW); // send the digits down to the shift registers!
shiftOut(datapin, clockpin, MSBFIRST, segdisp[1]); // print car lane number
shiftOut(datapin, clockpin, MSBFIRST, segdisp[ones_minutes1]); // print the lower sinutes digit
shiftOut(datapin, clockpin, MSBFIRST, segdisp[tens_seconds1]); // print the upper seconds digit
shiftOut(datapin, clockpin, MSBFIRST, segdisp[ones_seconds1]); // print the lower seconds digit
shiftOut(datapin, clockpin, MSBFIRST, segdisp[tenths1]); // print the tenths digit
shiftOut(datapin, clockpin, MSBFIRST, segdisp[hundredths1]); // print the hundredths digit
digitalWrite(latchpin, HIGH);
display_update1 = 0; // reset for next pass thru
}
if (display_update2 == 1 && i==0 || display_update1 == 1 && i==0){
digitalWrite(latchpin, LOW); // send the digits down to the shift registers!
shiftOut(datapin, clockpin, MSBFIRST, segdisp[2]); // print car lane number
shiftOut(datapin, clockpin, MSBFIRST, segdisp[ones_minutes2]); // print the lower sinutes digit
shiftOut(datapin, clockpin, MSBFIRST, segdisp[tens_seconds2]); // print the upper seconds digit
shiftOut(datapin, clockpin, MSBFIRST, segdisp[ones_seconds2]); // print the lower seconds digit
shiftOut(datapin, clockpin, MSBFIRST, segdisp[tenths2]); // print the tenths digit
shiftOut(datapin, clockpin, MSBFIRST, segdisp[hundredths2]); // print the hundredths digit
digitalWrite(latchpin, HIGH);
display_update2 = 0; // reset for next pass thru
}
}// end void loop
Stoppuhr_1-140924a.zip (3.18 KB)