forked from lichess-org/lila
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Merge pull request lichess-org#3666 from isaacl/anyvalSteroids"
- Loading branch information
Showing
13 changed files
with
509 additions
and
516 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package lila.common | ||
|
||
import scala.concurrent.duration._ | ||
import java.util.concurrent.TimeUnit | ||
|
||
import com.typesafe.config.Config | ||
|
||
object PimpedConfig { | ||
|
||
implicit final class LilaPimpedConfig(val config: Config) extends AnyVal { | ||
|
||
def millis(name: String): Int = config.getDuration(name, TimeUnit.MILLISECONDS).toInt | ||
def seconds(name: String): Int = config.getDuration(name, TimeUnit.SECONDS).toInt | ||
def duration(name: String): FiniteDuration = millis(name).millis | ||
} | ||
} |
Oops, something went wrong.