Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class BasePacket(val priority : Priority,
- toRun : => Unit
- ) extends Runnable with Comparable[BasePacket] {
- override def run() {
- val start = java.lang.System.nanoTime()
- toRun
- val end = java.lang.System.nanoTime()
- log("Timerec " + Thread.currentThread().getId() + " " + start + " " + end)
- }
- override def compareTo(other : BasePacket) = priority.compareTo(other.priority)
- }
- class PerformerPacket(
- pri : Priority,
- key : Key
- )
- extends BasePacket(pri,this.sss()) {
- def sss() {}
- }
Add Comment
Please, Sign In to add comment