Library Version 11.2.5.3

DbEnv::get_timeout()
Prev | Chapter 5. The DbEnv Handle | Next

## DbEnv::get_timeout()

    #include <db_cxx.h>

    int
    DbEnv::get_timeout(db_timeout_t *timeoutp, u_int32_t flag);

The `DbEnv::get_timeout()` method returns a value, in microseconds, representing either lock or transaction timeouts. These values are set using the DbEnv::set_timeout() method.

The `DbEnv::get_timeout()` method may be called at any time during the life of the application.

The `DbEnv::get_timeout()` method either returns a non-zero error value or throws an exception that encapsulates a non-zero error value on failure, and returns 0 on success.

### Parameters

#### timeoutp

The timeoutp parameter references memory into which the timeout value of the specified flag parameter is copied.

#### flag

The flags parameter must be set to one of the following values:

- `DB_SET_LOCK_TIMEOUT`

  Return the timeout value for locks in this database environment.

- `DB_SET_REG_TIMEOUT`

  Return the timeout value for how long to wait for processes to exit the environment before recovery is started. This flag only has meaning when the DbEnv::open() method was called with the DB_REGISTER flag and recovery must be performed.

- `DB_SET_TXN_TIMEOUT`

  Return the timeout value for transactions in this database environment.

### Class

DbEnv

### See Also

Database Environments and Related Methods, DbEnv::set_timeout()

Prev | Up | Next
DbEnv::get_thread_count() | Home | DbEnv::get_tmp_dir()