def compare
(y
: SmartTime
) = { case InfiniteFuture
=> -
1 case ConcreteTime
(y
) => x compare y
}
}
}
}
def main
(args
: Array
[String
]): Unit
= { val y
= ConcreteTime
(100) println(Vector(y, z, x, p).sortWith(_ < _))
}
}
c2VhbGVkIGFic3RyYWN0IGNsYXNzIFNtYXJ0VGltZSBleHRlbmRzIE9yZGVyZWRbU21hcnRUaW1lXSB7IHggPT4KCWRlZiBjb21wYXJlKHk6IFNtYXJ0VGltZSkgPSB7CgkJeCBtYXRjaCB7CgkJCWNhc2UgSW5maW5pdGVGdXR1cmUgPT4gMQoJCQljYXNlIEluZmluaXRlUGFzdCA9PiAtMQoJCQljYXNlIENvbmNyZXRlVGltZSh4KSA9PgoJCQkJeSBtYXRjaCB7CgkJCQkJY2FzZSBJbmZpbml0ZUZ1dHVyZSA9PiAtMQoJCQkJCWNhc2UgSW5maW5pdGVQYXN0ID0+IDEKCQkJCQljYXNlIENvbmNyZXRlVGltZSh5KSA9PiB4IGNvbXBhcmUgeQoJCQkJfQoJCX0KCX0KfQpjYXNlIGNsYXNzIENvbmNyZXRlVGltZSh0OiBMb25nKSBleHRlbmRzIFNtYXJ0VGltZQpjYXNlIG9iamVjdCBJbmZpbml0ZUZ1dHVyZSBleHRlbmRzIFNtYXJ0VGltZQpjYXNlIG9iamVjdCBJbmZpbml0ZVBhc3QgZXh0ZW5kcyBTbWFydFRpbWUKCm9iamVjdCBNYWluIHsKCWRlZiBtYWluKGFyZ3M6IEFycmF5W1N0cmluZ10pOiBVbml0ID0gewoJCXZhbCB5ID0gQ29uY3JldGVUaW1lKDEwMCkKCQl2YWwgeiA9IENvbmNyZXRlVGltZSgxMCkKCQl2YWwgeCA9IEluZmluaXRlRnV0dXJlCgkJdmFsIHAgPSBJbmZpbml0ZVBhc3QKCQlwcmludGxuKFZlY3Rvcih5LCB6LCB4LCBwKS5zb3J0V2l0aChfIDwgXykpCgl9Cn0=