| | |
| | | |
| | | |
| | | import static org.opends.server.core.CoreConstants.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | |
| | | new ArrayList<Control>(0); |
| | | |
| | | /** |
| | | * Indicates whether to use nanoTime instead of |
| | | * currentTimeMillis when setting processing start and stop times. |
| | | */ |
| | | protected static boolean useNanoTime = false; |
| | | |
| | | static |
| | | { |
| | | if(System.getProperty(PROPERTY_ETIME_NANO) != null && |
| | | System.getProperty(PROPERTY_ETIME_NANO). |
| | | equalsIgnoreCase("true")) |
| | | { |
| | | useNanoTime = true; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * The client connection with which this operation is associated. |
| | | */ |
| | | protected final ClientConnection clientConnection; |
| | |
| | | */ |
| | | public final void setProcessingStartTime() |
| | | { |
| | | processingStartTime = System.currentTimeMillis(); |
| | | if(useNanoTime) |
| | | { |
| | | processingStartTime = System.nanoTime(); |
| | | } |
| | | else |
| | | { |
| | | processingStartTime = System.currentTimeMillis(); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | */ |
| | | public final void setProcessingStopTime() |
| | | { |
| | | this.processingStopTime = System.currentTimeMillis(); |
| | | if(useNanoTime) |
| | | { |
| | | this.processingStopTime = System.nanoTime(); |
| | | } |
| | | else |
| | | { |
| | | this.processingStopTime = System.currentTimeMillis(); |
| | | } |
| | | } |
| | | |
| | | |