BASH snippet for a stopwatch
This is where kill -0 comes in to play. I can start a process that sleeps for 10 seconds and then exits. By checking if the process is still running, I'll know that the 10 seconds aren't over yet.
sleep 10 &
while kill -0 $sleep_pid && ! check <(curl http://service); do
Amsterdam based mastodon instance for the Dutch community, but open to anyone. Primary languages Dutch and English.