From: "Distribution Lists" <[EMAIL PROTECTED]>

> I've written some Perl code that will make use of LDAP modules and
> will do an LDAPSEARCH to a specific ldap server. However, I would like
> to know the time take to complete the LDAPSEARCH so I can graph the
> response time. What can I do within Perl to measure the completion
> time of the search ?

use Time::HiRes qw(gettimeofday tv_interval);

$t0 = [gettimeofday];

do_the_action();

$elapsed = tv_interval ( $t0 );

print "It took $elapsed seconds\n";

Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
        -- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to