summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2f2a0f2)
raw | patch | inline | side by side (parent: 2f2a0f2)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 20 Nov 2009 10:35:07 +0000 (10:35 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 20 Nov 2009 10:35:07 +0000 (10:35 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14831 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_ldap.inc | patch | blob | history | |
gosa-core/include/functions.inc | patch | blob | history |
index f0e3fe1f85178de7ccd8b589f7e43f5d23e43f17..463f6b9e1251fa3461a01ca4a5b2baf592bb0e17 100644 (file)
if($this->hascon){
if ($this->reconnect) $this->connect();
- $start = microtime();
+ $start = microtime(true);
$this->clearResult($srp);
$this->sr[$srp] = @ldap_search($this->cid, LDAP::fix($this->basedn), $filter, $attrs);
$this->error = @ldap_error($this->cid);
/* Check if query took longer as specified in max_ldap_query_time */
if($this->max_ldap_query_time){
- $diff = get_MicroTimeDiff($start,microtime());
+ $diff = microtime(true) - $start;
if($diff > $this->max_ldap_query_time){
msg_dialog::display(_("Performance warning"), sprintf(_("LDAP performance is poor: last query took about %.2fs!"), $diff), WARNING_DIALOG);
}
}
- $this->log("LDAP operation: time=".get_MicroTimeDiff($start,microtime())." operation=search('".LDAP::fix($this->basedn)."', '$filter')");
+ $this->log("LDAP operation: time=".(microtime(true)-$start)." operation=search('".LDAP::fix($this->basedn)."', '$filter')");
return($this->sr[$srp]);
}else{
$this->error = "Could not connect to LDAP server";
else
$basedn= LDAP::convert($basedn);
- $start = microtime();
+ $start = microtime(true);
$this->sr[$srp] = @ldap_list($this->cid, LDAP::fix($basedn), $filter,$attrs);
$this->error = @ldap_error($this->cid);
$this->resetResult($srp);
/* Check if query took longer as specified in max_ldap_query_time */
if($this->max_ldap_query_time){
- $diff = get_MicroTimeDiff($start,microtime());
+ $diff = microtime(true) - $start;
if($diff > $this->max_ldap_query_time){
msg_dialog::display(_("Performance warning"), sprintf(_("LDAP performance is poor: last query took about %.2fs!"), $diff), WARNING_DIALOG);
}
}
- $this->log("LDAP operation: time=".get_MicroTimeDiff($start,microtime())." operation=ls('".LDAP::fix($basedn)."', '$filter')");
+ $this->log("LDAP operation: time=".(microtime(true) - $start)." operation=ls('".LDAP::fix($basedn)."', '$filter')");
return($this->sr[$srp]);
}else{
index 20d09e27e2d7750d3b8b21898d1a8ef0d0c789f1..fffa4c6ca175dba71866b1bb19e3e743dddba75e 100644 (file)
}
-/* Resturns the difference between to microtime() results in float */
-function get_MicroTimeDiff($start , $stop)
-{
- $a = split("\ ",$start);
- $b = split("\ ",$stop);
-
- $secs = $b[1] - $a[1];
- $msecs= $b[0] - $a[0];
-
- $ret = (float) ($secs+ $msecs);
- return($ret);
-}
-
-
function get_base_dir()
{
global $BASE_DIR;