1 // Copyright (c) 2011-present, Facebook, Inc.  All rights reserved.
2 //  This source code is licensed under both the GPLv2 (found in the
3 //  COPYING file in the root directory) and Apache 2.0 License
4 //  (found in the LICENSE.Apache file in the root directory).
5 
6 package org.rocksdb;
7 
8 /**
9  * Timed environment.
10  */
11 public class TimedEnv extends Env {
12 
13   /**
14    * <p>Creates a new environment that measures function call times for
15    * filesystem operations, reporting results to variables in PerfContext.</p>
16    *
17    *
18    * <p>The caller must delete the result when it is
19    * no longer needed.</p>
20    *
21    * @param baseEnv the base environment,
22    *     must remain live while the result is in use.
23    */
TimedEnv(final Env baseEnv)24   public TimedEnv(final Env baseEnv) {
25     super(createTimedEnv(baseEnv.nativeHandle_));
26   }
27 
createTimedEnv(final long baseEnvHandle)28   private static native long createTimedEnv(final long baseEnvHandle);
disposeInternal(final long handle)29   @Override protected final native void disposeInternal(final long handle);
30 }
31