From efe073ca460ec29111cf35dfb760016bea4a7dc5 Mon Sep 17 00:00:00 2001 From: "Matteo Nastasi (mop)" Date: Mon, 9 May 2011 08:17:40 +0200 Subject: [PATCH] timing log on Challenges semaphore --- web/Obj/auth.phh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/web/Obj/auth.phh b/web/Obj/auth.phh index 963755a..c96a090 100644 --- a/web/Obj/auth.phh +++ b/web/Obj/auth.phh @@ -47,6 +47,8 @@ class Challenge { } class Challenges { + static $delta_t; + var $item; var $item_n; var $mod; @@ -255,7 +257,8 @@ class Challenges { return (FALSE); } if (sem_acquire($res)) { - log_lock("LOCK challenges"); + self::$delta_t = microtime(TRUE); + log_lock("LOCK challenges [".self::$delta_t."]"); return ($res); } else @@ -266,7 +269,7 @@ class Challenges { { GLOBAL $sess; - log_lock("UNLOCK challenges"); + log_lock("UNLOCK challenges [".(microtime(TRUE) - (self::$delta_t))."]"); return (sem_release($res)); } -- 2.17.1