about summary refs log tree commit diff
path: root/afl-whatsup
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2024-05-11 09:16:21 +0200
committerGitHub <noreply@github.com>2024-05-11 09:16:21 +0200
commit90fbf59bf16f057e50132b81be759414787ce1a3 (patch)
treee57ec2ff73da06776f6cf9c20eb907a8c5aebf05 /afl-whatsup
parentad0d0c77fb313e6edfee111fecf2bcd16d8f915e (diff)
parent93c7cbd49603c1a256caf3ab6e971c9f4e40bab4 (diff)
downloadafl++-90fbf59bf16f057e50132b81be759414787ce1a3.tar.gz
Merge pull request #2084 from AFLplusplus/dev
push to stable
Diffstat (limited to 'afl-whatsup')
-rwxr-xr-xafl-whatsup8
1 files changed, 7 insertions, 1 deletions
diff --git a/afl-whatsup b/afl-whatsup
index 55ef2473..19841755 100755
--- a/afl-whatsup
+++ b/afl-whatsup
@@ -111,7 +111,13 @@ if [ -z "$NO_COLOR" ]; then
   RESET="$NC"
 fi
 
-CUR_TIME=`date +%s`
+PLATFORM=`uname -s`
+if [ "$PLATFORM" = "Linux" ] ; then
+  CUR_TIME=`cat /proc/uptime | awk '{printf "%.0f\n", $1}'`
+else
+  # This will lead to inacurate results but will prevent the script from breaking on platforms other than Linux
+  CUR_TIME=`date +%s`
+fi
 
 TMP=`mktemp -t .afl-whatsup-XXXXXXXX` || TMP=`mktemp -p /data/local/tmp .afl-whatsup-XXXXXXXX` || TMP=`mktemp -p /data/local/tmp .afl-whatsup-XXXXXXXX` || exit 1
 trap "rm -f $TMP" 1 2 3 13 15