Skip to content

Commit

Permalink
Make Stopwatch's constructors package private.
Browse files Browse the repository at this point in the history
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=94623624
  • Loading branch information
kluever authored and cpovirk committed Jun 1, 2015
1 parent fd29d0e commit cc9a685
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 30 deletions.
Expand Up @@ -124,24 +124,10 @@ public static Stopwatch createStarted(Ticker ticker) {
return new Stopwatch(ticker).start();
}

/**
* Creates (but does not start) a new stopwatch using {@link System#nanoTime}
* as its time source.
*
* @deprecated Use {@link Stopwatch#createUnstarted()} instead.
*/
@Deprecated
Stopwatch() {
this(Ticker.systemTicker());
this.ticker = Ticker.systemTicker();
}

/**
* Creates (but does not start) a new stopwatch, using the specified time
* source.
*
* @deprecated Use {@link Stopwatch#createUnstarted(Ticker)} instead.
*/
@Deprecated
Stopwatch(Ticker ticker) {
this.ticker = checkNotNull(ticker, "ticker");
}
Expand Down Expand Up @@ -258,3 +244,4 @@ private static String abbreviate(TimeUnit unit) {
}
}
}

16 changes: 1 addition & 15 deletions guava/src/com/google/common/base/Stopwatch.java
Expand Up @@ -126,24 +126,10 @@ public static Stopwatch createStarted(Ticker ticker) {
return new Stopwatch(ticker).start();
}

/**
* Creates (but does not start) a new stopwatch using {@link System#nanoTime}
* as its time source.
*
* @deprecated Use {@link Stopwatch#createUnstarted()} instead.
*/
@Deprecated
Stopwatch() {
this(Ticker.systemTicker());
this.ticker = Ticker.systemTicker();
}

/**
* Creates (but does not start) a new stopwatch, using the specified time
* source.
*
* @deprecated Use {@link Stopwatch#createUnstarted(Ticker)} instead.
*/
@Deprecated
Stopwatch(Ticker ticker) {
this.ticker = checkNotNull(ticker, "ticker");
}
Expand Down

0 comments on commit cc9a685

Please sign in to comment.