public final class com.google.common.base.Stopwatch
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: com.google.common.base.Stopwatch
super_class: java.lang.Object
{
private final com.google.common.base.Ticker ticker;
descriptor: Lcom/google/common/base/Ticker;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private boolean isRunning;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private long elapsedNanos;
descriptor: J
flags: (0x0002) ACC_PRIVATE
private long startTick;
descriptor: J
flags: (0x0002) ACC_PRIVATE
private static volatile int[] $SWITCH_TABLE$java$util$concurrent$TimeUnit;
descriptor: [I
flags: (0x104a) ACC_PRIVATE, ACC_STATIC, ACC_VOLATILE, ACC_SYNTHETIC
public static com.google.common.base.Stopwatch createUnstarted();
descriptor: ()Lcom/google/common/base/Stopwatch;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: new com.google.common.base.Stopwatch
dup
invokespecial com.google.common.base.Stopwatch.<init>:()V
areturn
LocalVariableTable:
Start End Slot Name Signature
public static com.google.common.base.Stopwatch createUnstarted(com.google.common.base.Ticker);
descriptor: (Lcom/google/common/base/Ticker;)Lcom/google/common/base/Stopwatch;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: new com.google.common.base.Stopwatch
dup
aload 0
invokespecial com.google.common.base.Stopwatch.<init>:(Lcom/google/common/base/Ticker;)V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 ticker Lcom/google/common/base/Ticker;
MethodParameters:
Name Flags
ticker
public static com.google.common.base.Stopwatch createStarted();
descriptor: ()Lcom/google/common/base/Stopwatch;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: new com.google.common.base.Stopwatch
dup
invokespecial com.google.common.base.Stopwatch.<init>:()V
invokevirtual com.google.common.base.Stopwatch.start:()Lcom/google/common/base/Stopwatch;
areturn
LocalVariableTable:
Start End Slot Name Signature
public static com.google.common.base.Stopwatch createStarted(com.google.common.base.Ticker);
descriptor: (Lcom/google/common/base/Ticker;)Lcom/google/common/base/Stopwatch;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: new com.google.common.base.Stopwatch
dup
aload 0
invokespecial com.google.common.base.Stopwatch.<init>:(Lcom/google/common/base/Ticker;)V
invokevirtual com.google.common.base.Stopwatch.start:()Lcom/google/common/base/Stopwatch;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 ticker Lcom/google/common/base/Ticker;
MethodParameters:
Name Flags
ticker
void <init>();
descriptor: ()V
flags: (0x0000)
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
invokestatic com.google.common.base.Ticker.systemTicker:()Lcom/google/common/base/Ticker;
putfield com.google.common.base.Stopwatch.ticker:Lcom/google/common/base/Ticker;
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/google/common/base/Stopwatch;
void <init>(com.google.common.base.Ticker);
descriptor: (Lcom/google/common/base/Ticker;)V
flags: (0x0000)
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aload 1
ldc "ticker"
invokestatic com.google.common.base.Preconditions.checkNotNull:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
checkcast com.google.common.base.Ticker
putfield com.google.common.base.Stopwatch.ticker:Lcom/google/common/base/Ticker;
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/google/common/base/Stopwatch;
0 3 1 ticker Lcom/google/common/base/Ticker;
MethodParameters:
Name Flags
ticker
public boolean isRunning();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.google.common.base.Stopwatch.isRunning:Z
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/google/common/base/Stopwatch;
public com.google.common.base.Stopwatch start();
descriptor: ()Lcom/google/common/base/Stopwatch;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
getfield com.google.common.base.Stopwatch.isRunning:Z
ifeq 1
iconst_0
goto 2
StackMap locals:
StackMap stack:
1: iconst_1
StackMap locals:
StackMap stack: int
2: ldc "This stopwatch is already running."
invokestatic com.google.common.base.Preconditions.checkState:(ZLjava/lang/Object;)V
3: aload 0
iconst_1
putfield com.google.common.base.Stopwatch.isRunning:Z
4: aload 0
aload 0
getfield com.google.common.base.Stopwatch.ticker:Lcom/google/common/base/Ticker;
invokevirtual com.google.common.base.Ticker.read:()J
putfield com.google.common.base.Stopwatch.startTick:J
5: aload 0
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/google/common/base/Stopwatch;
RuntimeInvisibleAnnotations:
com.google.errorprone.annotations.CanIgnoreReturnValue()
public com.google.common.base.Stopwatch stop();
descriptor: ()Lcom/google/common/base/Stopwatch;
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=3, args_size=1
start local 0 0: aload 0
getfield com.google.common.base.Stopwatch.ticker:Lcom/google/common/base/Ticker;
invokevirtual com.google.common.base.Ticker.read:()J
lstore 1
start local 1 1: aload 0
getfield com.google.common.base.Stopwatch.isRunning:Z
ldc "This stopwatch is already stopped."
invokestatic com.google.common.base.Preconditions.checkState:(ZLjava/lang/Object;)V
2: aload 0
iconst_0
putfield com.google.common.base.Stopwatch.isRunning:Z
3: aload 0
dup
getfield com.google.common.base.Stopwatch.elapsedNanos:J
lload 1
aload 0
getfield com.google.common.base.Stopwatch.startTick:J
lsub
ladd
putfield com.google.common.base.Stopwatch.elapsedNanos:J
4: aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lcom/google/common/base/Stopwatch;
1 5 1 tick J
RuntimeInvisibleAnnotations:
com.google.errorprone.annotations.CanIgnoreReturnValue()
public com.google.common.base.Stopwatch reset();
descriptor: ()Lcom/google/common/base/Stopwatch;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
lconst_0
putfield com.google.common.base.Stopwatch.elapsedNanos:J
1: aload 0
iconst_0
putfield com.google.common.base.Stopwatch.isRunning:Z
2: aload 0
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/google/common/base/Stopwatch;
RuntimeInvisibleAnnotations:
com.google.errorprone.annotations.CanIgnoreReturnValue()
private long elapsedNanos();
descriptor: ()J
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=1, args_size=1
start local 0 0: aload 0
getfield com.google.common.base.Stopwatch.isRunning:Z
ifeq 1
aload 0
getfield com.google.common.base.Stopwatch.ticker:Lcom/google/common/base/Ticker;
invokevirtual com.google.common.base.Ticker.read:()J
aload 0
getfield com.google.common.base.Stopwatch.startTick:J
lsub
aload 0
getfield com.google.common.base.Stopwatch.elapsedNanos:J
ladd
goto 2
StackMap locals:
StackMap stack:
1: aload 0
getfield com.google.common.base.Stopwatch.elapsedNanos:J
StackMap locals:
StackMap stack: long
2: lreturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/google/common/base/Stopwatch;
public long elapsed(java.util.concurrent.TimeUnit);
descriptor: (Ljava/util/concurrent/TimeUnit;)J
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 1
aload 0
invokevirtual com.google.common.base.Stopwatch.elapsedNanos:()J
getstatic java.util.concurrent.TimeUnit.NANOSECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual java.util.concurrent.TimeUnit.convert:(JLjava/util/concurrent/TimeUnit;)J
lreturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/google/common/base/Stopwatch;
0 1 1 desiredUnit Ljava/util/concurrent/TimeUnit;
MethodParameters:
Name Flags
desiredUnit
public java.time.Duration elapsed();
descriptor: ()Ljava/time/Duration;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual com.google.common.base.Stopwatch.elapsedNanos:()J
invokestatic java.time.Duration.ofNanos:(J)Ljava/time/Duration;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/google/common/base/Stopwatch;
RuntimeInvisibleAnnotations:
com.google.common.annotations.GwtIncompatible()
public java.lang.String toString();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=6, args_size=1
start local 0 0: aload 0
invokevirtual com.google.common.base.Stopwatch.elapsedNanos:()J
lstore 1
start local 1 1: lload 1
invokestatic com.google.common.base.Stopwatch.chooseUnit:(J)Ljava/util/concurrent/TimeUnit;
astore 3
start local 3 2: lload 1
l2d
getstatic java.util.concurrent.TimeUnit.NANOSECONDS:Ljava/util/concurrent/TimeUnit;
lconst_1
aload 3
invokevirtual java.util.concurrent.TimeUnit.convert:(JLjava/util/concurrent/TimeUnit;)J
l2d
ddiv
dstore 4
start local 4 3: new java.lang.StringBuilder
dup
dload 4
invokestatic com.google.common.base.Platform.formatCompact4Digits:(D)Ljava/lang/String;
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc " "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 3
invokestatic com.google.common.base.Stopwatch.abbreviate:(Ljava/util/concurrent/TimeUnit;)Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
areturn
end local 4 end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lcom/google/common/base/Stopwatch;
1 4 1 nanos J
2 4 3 unit Ljava/util/concurrent/TimeUnit;
3 4 4 value D
private static java.util.concurrent.TimeUnit chooseUnit(long);
descriptor: (J)Ljava/util/concurrent/TimeUnit;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=2, args_size=1
start local 0 0: getstatic java.util.concurrent.TimeUnit.DAYS:Ljava/util/concurrent/TimeUnit;
lload 0
getstatic java.util.concurrent.TimeUnit.NANOSECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual java.util.concurrent.TimeUnit.convert:(JLjava/util/concurrent/TimeUnit;)J
lconst_0
lcmp
ifle 2
1: getstatic java.util.concurrent.TimeUnit.DAYS:Ljava/util/concurrent/TimeUnit;
areturn
2: StackMap locals:
StackMap stack:
getstatic java.util.concurrent.TimeUnit.HOURS:Ljava/util/concurrent/TimeUnit;
lload 0
getstatic java.util.concurrent.TimeUnit.NANOSECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual java.util.concurrent.TimeUnit.convert:(JLjava/util/concurrent/TimeUnit;)J
lconst_0
lcmp
ifle 4
3: getstatic java.util.concurrent.TimeUnit.HOURS:Ljava/util/concurrent/TimeUnit;
areturn
4: StackMap locals:
StackMap stack:
getstatic java.util.concurrent.TimeUnit.MINUTES:Ljava/util/concurrent/TimeUnit;
lload 0
getstatic java.util.concurrent.TimeUnit.NANOSECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual java.util.concurrent.TimeUnit.convert:(JLjava/util/concurrent/TimeUnit;)J
lconst_0
lcmp
ifle 6
5: getstatic java.util.concurrent.TimeUnit.MINUTES:Ljava/util/concurrent/TimeUnit;
areturn
6: StackMap locals:
StackMap stack:
getstatic java.util.concurrent.TimeUnit.SECONDS:Ljava/util/concurrent/TimeUnit;
lload 0
getstatic java.util.concurrent.TimeUnit.NANOSECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual java.util.concurrent.TimeUnit.convert:(JLjava/util/concurrent/TimeUnit;)J
lconst_0
lcmp
ifle 8
7: getstatic java.util.concurrent.TimeUnit.SECONDS:Ljava/util/concurrent/TimeUnit;
areturn
8: StackMap locals:
StackMap stack:
getstatic java.util.concurrent.TimeUnit.MILLISECONDS:Ljava/util/concurrent/TimeUnit;
lload 0
getstatic java.util.concurrent.TimeUnit.NANOSECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual java.util.concurrent.TimeUnit.convert:(JLjava/util/concurrent/TimeUnit;)J
lconst_0
lcmp
ifle 10
9: getstatic java.util.concurrent.TimeUnit.MILLISECONDS:Ljava/util/concurrent/TimeUnit;
areturn
10: StackMap locals:
StackMap stack:
getstatic java.util.concurrent.TimeUnit.MICROSECONDS:Ljava/util/concurrent/TimeUnit;
lload 0
getstatic java.util.concurrent.TimeUnit.NANOSECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual java.util.concurrent.TimeUnit.convert:(JLjava/util/concurrent/TimeUnit;)J
lconst_0
lcmp
ifle 12
11: getstatic java.util.concurrent.TimeUnit.MICROSECONDS:Ljava/util/concurrent/TimeUnit;
areturn
12: StackMap locals:
StackMap stack:
getstatic java.util.concurrent.TimeUnit.NANOSECONDS:Ljava/util/concurrent/TimeUnit;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 nanos J
MethodParameters:
Name Flags
nanos
private static java.lang.String abbreviate(java.util.concurrent.TimeUnit);
descriptor: (Ljava/util/concurrent/TimeUnit;)Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: invokestatic com.google.common.base.Stopwatch.$SWITCH_TABLE$java$util$concurrent$TimeUnit:()[I
aload 0
invokevirtual java.util.concurrent.TimeUnit.ordinal:()I
iaload
tableswitch { // 1 - 7
1: 1
2: 2
3: 3
4: 4
5: 5
6: 6
7: 7
default: 8
}
1: StackMap locals:
StackMap stack:
ldc "ns"
areturn
2: StackMap locals:
StackMap stack:
ldc "\u03BCs"
areturn
3: StackMap locals:
StackMap stack:
ldc "ms"
areturn
4: StackMap locals:
StackMap stack:
ldc "s"
areturn
5: StackMap locals:
StackMap stack:
ldc "min"
areturn
6: StackMap locals:
StackMap stack:
ldc "h"
areturn
7: StackMap locals:
StackMap stack:
ldc "d"
areturn
8: StackMap locals:
StackMap stack:
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 unit Ljava/util/concurrent/TimeUnit;
MethodParameters:
Name Flags
unit
static int[] $SWITCH_TABLE$java$util$concurrent$TimeUnit();
descriptor: ()[I
flags: (0x1008) ACC_STATIC, ACC_SYNTHETIC
Code:
stack=3, locals=1, args_size=0
0: getstatic com.google.common.base.Stopwatch.$SWITCH_TABLE$java$util$concurrent$TimeUnit:[I
dup
ifnull 1
areturn
StackMap locals:
StackMap stack: int[]
1: pop
invokestatic java.util.concurrent.TimeUnit.values:()[Ljava/util/concurrent/TimeUnit;
arraylength
newarray 10
astore 0
2: aload 0
getstatic java.util.concurrent.TimeUnit.DAYS:Ljava/util/concurrent/TimeUnit;
invokevirtual java.util.concurrent.TimeUnit.ordinal:()I
bipush 7
iastore
3: goto 5
StackMap locals: int[]
StackMap stack: java.lang.NoSuchFieldError
4: pop
StackMap locals:
StackMap stack:
5: aload 0
getstatic java.util.concurrent.TimeUnit.HOURS:Ljava/util/concurrent/TimeUnit;
invokevirtual java.util.concurrent.TimeUnit.ordinal:()I
bipush 6
iastore
6: goto 8
StackMap locals:
StackMap stack: java.lang.NoSuchFieldError
7: pop
StackMap locals:
StackMap stack:
8: aload 0
getstatic java.util.concurrent.TimeUnit.MICROSECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual java.util.concurrent.TimeUnit.ordinal:()I
iconst_2
iastore
9: goto 11
StackMap locals:
StackMap stack: java.lang.NoSuchFieldError
10: pop
StackMap locals:
StackMap stack:
11: aload 0
getstatic java.util.concurrent.TimeUnit.MILLISECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual java.util.concurrent.TimeUnit.ordinal:()I
iconst_3
iastore
12: goto 14
StackMap locals:
StackMap stack: java.lang.NoSuchFieldError
13: pop
StackMap locals:
StackMap stack:
14: aload 0
getstatic java.util.concurrent.TimeUnit.MINUTES:Ljava/util/concurrent/TimeUnit;
invokevirtual java.util.concurrent.TimeUnit.ordinal:()I
iconst_5
iastore
15: goto 17
StackMap locals:
StackMap stack: java.lang.NoSuchFieldError
16: pop
StackMap locals:
StackMap stack:
17: aload 0
getstatic java.util.concurrent.TimeUnit.NANOSECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual java.util.concurrent.TimeUnit.ordinal:()I
iconst_1
iastore
18: goto 20
StackMap locals:
StackMap stack: java.lang.NoSuchFieldError
19: pop
StackMap locals:
StackMap stack:
20: aload 0
getstatic java.util.concurrent.TimeUnit.SECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual java.util.concurrent.TimeUnit.ordinal:()I
iconst_4
iastore
21: goto 23
StackMap locals:
StackMap stack: java.lang.NoSuchFieldError
22: pop
StackMap locals:
StackMap stack:
23: aload 0
dup
putstatic com.google.common.base.Stopwatch.$SWITCH_TABLE$java$util$concurrent$TimeUnit:[I
areturn
LocalVariableTable:
Start End Slot Name Signature
Exception table:
from to target type
2 3 4 Class java.lang.NoSuchFieldError
5 6 7 Class java.lang.NoSuchFieldError
8 9 10 Class java.lang.NoSuchFieldError
11 12 13 Class java.lang.NoSuchFieldError
14 15 16 Class java.lang.NoSuchFieldError
17 18 19 Class java.lang.NoSuchFieldError
20 21 22 Class java.lang.NoSuchFieldError
}
SourceFile: "Stopwatch.java"
RuntimeInvisibleAnnotations:
com.google.common.annotations.GwtCompatible(emulated = true)