Created
December 1, 2018 21:52
-
-
Save dorsev/ae0ce89ab51766a1ae2b76f5f55c0ae9 to your computer and use it in GitHub Desktop.
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
trait Gauge { | |
def set(off: Long): Unit | |
} | |
val gauge: Gauge = ??? | |
val counter: AtomicLong = ??? | |
def offsetMonitor[A](monitor: Long=>Unit) = | |
monitor(12) | |
offsetMonitor(gauge.set _) | |
offsetMonitor(counter.set _) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment