We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8377a5b commit d980e86Copy full SHA for d980e86
modules/common/src/main/PlayApp.scala
@@ -9,14 +9,15 @@ import scala.collection.JavaConversions._
9
object PlayApp {
10
11
val startedAt = DateTime.now
12
+ val startedAtMillis = nowMillis
13
14
def uptime = new Period(startedAt, DateTime.now)
15
16
def startedSinceMinutes(minutes: Int) =
- startedAt.isBefore(DateTime.now minusMinutes minutes)
17
+ startedSinceSeconds(minutes * 60)
18
19
def startedSinceSeconds(seconds: Int) =
- startedAt.isBefore(DateTime.now minusSeconds seconds)
20
+ startedAtMillis < (nowMillis - (seconds * 1000))
21
22
def loadConfig: Config = withApp(_.configuration.underlying)
23
0 commit comments