[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 14/20: Improve DBG , add stopwatch : timer_st
From: |
dwm |
Subject: |
[Noalyss-commit] [noalyss] 14/20: Improve DBG , add stopwatch : timer_start and timer_show |
Date: |
Sun, 10 Dec 2023 03:22:24 -0500 (EST) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit aa6e2848af58c5772e13c67ef4ee57990a6f74b3
Author: Dany wm <danydb@noalyss.eu>
AuthorDate: Thu Dec 7 21:41:12 2023 +0100
Improve DBG , add stopwatch : timer_start and timer_show
---
include/lib/dbg.php | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/include/lib/dbg.php b/include/lib/dbg.php
index b5ac58d43..a0570b104 100644
--- a/include/lib/dbg.php
+++ b/include/lib/dbg.php
@@ -134,5 +134,20 @@ EOF;
EOF;
return $r;
}
+
+ public static function timer_start()
+ {
+ global $timer;
+ $timer=hrtime(true);
+ }
+ public static function timer_show()
+ {
+ global $timer;
+ // $delta=$timer-microtime(true) ;
+ echo '<span style="font-size:80%;color:navy;background:lightgreen">';
+ echo _("Temps écoulé : ");
+ echo (hrtime(true)-$timer)/1e+6;
+ echo '</span>';
+ }
}
?>
- [Noalyss-commit] [noalyss] 01/20: PHP Compatibility 8.1, (continued)
- [Noalyss-commit] [noalyss] 01/20: PHP Compatibility 8.1, dwm, 2023/12/10
- [Noalyss-commit] [noalyss] 17/20: PRINTGL Main Ledger (GL), dwm, 2023/12/10
- [Noalyss-commit] [noalyss] 20/20: Fix merge issue, dwm, 2023/12/10
- [Noalyss-commit] [noalyss] 06/20: ergo, dwm, 2023/12/10
- [Noalyss-commit] [noalyss] 15/20: Improve DatabaseCore : fetch_all, dwm, 2023/12/10
- [Noalyss-commit] [noalyss] 10/20: Merge master, dwm, 2023/12/10
- [Noalyss-commit] [noalyss] 07/20: Update link to https://www.noalyss.eu instead of http, dwm, 2023/12/10
- [Noalyss-commit] [noalyss] 03/20: Documentation, dwm, 2023/12/10
- [Noalyss-commit] [noalyss] 09/20: Protect Qcode in fiche_detail, dwm, 2023/12/10
- [Noalyss-commit] [noalyss] 04/20: PHP8.2 deprecated, dwm, 2023/12/10
- [Noalyss-commit] [noalyss] 14/20: Improve DBG , add stopwatch : timer_start and timer_show,
dwm <=
- [Noalyss-commit] [noalyss] 12/20: Improve Unit Test for Report, dwm, 2023/12/10