#include "portable.h"
#include <stdio.h>
-#include <sys/time.h>
-#include <unistd.h>
#include <ac/string.h>
+#include <ac/time.h>
+#include <ac/unistd.h>
#include "slap.h"
#include "back-bdb2.h"
int
bdb2_back_abandon(
BackendDB *be,
- Connection *c,
- Operation *o,
+ Connection *conn,
+ Operation *op,
int msgid )
{
- struct timeval time1, time2;
- char *elapsed_time;
- int ret;
-
- gettimeofday( &time1, NULL );
-
- ret = bdb2i_back_abandon_internal( be, c, o, msgid );
+ struct timeval time1;
+ int ret;
- if ( bdb2i_do_timing ) {
+ bdb2i_start_timing( be->bd_info, &time1 );
- gettimeofday( &time2, NULL);
- elapsed_time = bdb2i_elapsed( time1, time2 );
- Debug( LDAP_DEBUG_ANY, "ABND elapsed=%s\n",
- elapsed_time, 0, 0 );
- free( elapsed_time );
+ ret = bdb2i_back_abandon_internal( be, conn, op, msgid );
- }
+ bdb2i_stop_timing( be->bd_info, time1, "ABND", conn, op );
return( ret );
}