diff --git a/travis-common.sh b/travis-common.sh
index 1970a825656b4c162100319842d3ea0f60e6f2c4..f099dc463c0f5e32669dc60d346ea16a43eb3338 100644
--- a/travis-common.sh
+++ b/travis-common.sh
@@ -6,12 +6,28 @@ CABAL_VERSION="1.25.0.0"
 # Timing / diagnostic output
 # ---------------------------------------------------------------------
 
+JOB_START_TIME=$(date +%s)
+
 timed() {
     echo "\$ $*"
     start_time=$(date +%s)
+
+	# Run the job
     $* || exit $?
+
+	# Calculate the durations
     end_time=$(date +%s)
     duration=$((end_time - start_time))
+	total_duration=$((end_time - JOB_START_TIME))
+
+	# Print them
     echo "$* took $duration seconds."
+    echo "whole job took $total_duration seconds so far."
+
+	# Terminate on OSX
+	if [ $total_duration -ge 2400 -a $(uname) = "Darwin" ]; then
+		echo "Job taking over 40 minutes. Terminating"
+		exit 1
+	fi
     echo "----"
 }