Add an timeout function to the notifications

Still coding style here: Space before opening curly brace please. ;) Also below 3 times.