Alle Dateien aus dem Pythonkurs
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

19 lines
316 B

#! /usr/bin/python3
# encoding:utf-8
import signal
import time
def handle_alarm(signum, frame):
print(f'Alarm ausgelöst bei {time.ctime()}')
signal.signal(signal.SIGALRM,handle_alarm)
signal.alarm(3)
print(f'aktuelle Zeit Start: {time.ctime()}')
time.sleep(13)
print(f'aktuelle Zeit Ende: {time.ctime()}')