diff --git a/docs/20_Checks/inc_pluginfunctions.md b/docs/20_Checks/inc_pluginfunctions.md
index 51773cb238a8387f9eb488eee49525e9f611826b..3d29275cf92eb98935c43e59f245759ac780895e 100644
--- a/docs/20_Checks/inc_pluginfunctions.md
+++ b/docs/20_Checks/inc_pluginfunctions.md
@@ -389,6 +389,23 @@ if [ $iWarnLimit -gt 0 -a $iCriticalLimit -gt 0 ]; then
 fi 
 ```
 
+### ph.showtimer
+
+Show a time in seconds and milliseconds since start (since source of inc_pluginfunctions.sh).
+You can use it to show an execution time.
+
+Syntax:
+
+```text
+ph.showtimer
+```
+
+It has no parameters.
+
+```shell
+2.410 sec
+```
+
 ### ph.status
 
 Show the current status (set by ``ph.setStatus``) as Text.
diff --git a/inc_pluginfunctions b/inc_pluginfunctions
index 3740c11bd49efa373bcdc0eb3ad91dc53bfc1360..d21ca196822a00f688de9ef09aa18fab94a8f002 100644
--- a/inc_pluginfunctions
+++ b/inc_pluginfunctions
@@ -40,6 +40,7 @@
 # 2023-08-24  v1.12 <axel.hahn@unibe.ch>      toUnit got 3rd param for count of digits after "."
 # 2023-08-30  v1.13 <axel.hahn@unibe.ch>      reverse return code in ph.hasParamoption to unix like return codes: 0=true; <>0 = false
 # 2023-09-05  v1.14 <axel.hahn@unibe.ch>      ph.require - show error below status line
+# 2023-09-14  v1.15 <axel.hahn@unibe.ch>      add ph.showtimer; fix broken pipe messages in journallog
 # ======================================================================
 
 
@@ -51,6 +52,8 @@ typeset -i ph_cfg__EXIT_UNKNOWN=3
 
 typeset -i ph_cfg__EXIT_CODE
 
+ph_timer_start=$( date +%s.%N )
+
 declare ph_perfdatafile=
 
 # abort a check and exit with status "unknown"
@@ -72,6 +75,19 @@ function ph.require(){
   fi
 }
 
+# get time in sec and milliseconds since start
+# no parameter is required
+function ph.showtimer(){
+  local timer_end; timer_end=$( date +%s.%N )
+  local totaltime; totaltime=$( awk "BEGIN {print $timer_end - $ph_timer_start }" )
+  local sec_time; sec_time=$( echo "$totaltime" | cut -f 1 -d "." )
+  test -z "$sec_time" && sec_time=0
+
+  local ms_time; ms_time=$( echo "$totaltime" | cut -f 2 -d "." | cut -c 1-3 )
+
+  echo "$sec_time.$ms_time sec"
+}
+
 # ----------------------------------------------------------------------
 # exit a check plugin
 function ph.exit(){
@@ -311,7 +327,7 @@ function ph.toUnit(){
 
     local _dots
 
-    test $_digits -gt 0 && _dots=$( yes "." | head -$_digits | tr -d "\n" )
+    test $_digits -gt 0 && _dots=$( yes "." 2>/dev/null | head -$_digits | tr -d "\n" )
     test $_digits -gt 0 && _bc+=" -l | grep -o '.*\\.${_dots}'"
 
     echo "$(echo "$_value" | tr -d "[:alpha:]" )*${_multiply}/$_divisor" | eval "$_bc" | sed "s#^\.#0.#"