--- a/src/Pure/General/timing.scala Thu Dec 02 10:44:33 2010 +0100
+++ b/src/Pure/General/timing.scala Thu Dec 02 10:46:03 2010 +0100
@@ -14,6 +14,10 @@
class Time(val ms: Long)
{
def seconds: Double = ms / 1000.0
+
+ def min(t: Time): Time = if (ms < t.ms) this else t
+ def max(t: Time): Time = if (ms > t.ms) this else t
+
override def toString =
String.format(java.util.Locale.ROOT, "%.3f", seconds.asInstanceOf[AnyRef])
def message: String = toString + "s"
--- a/src/Tools/jEdit/src/jedit/plugin.scala Thu Dec 02 10:44:33 2010 +0100
+++ b/src/Tools/jEdit/src/jedit/plugin.scala Thu Dec 02 10:46:03 2010 +0100
@@ -121,7 +121,7 @@
HTML.encode(text) + "</pre></html>"
def tooltip_dismiss_delay(): Time =
- Time_Property("tooltip-dismiss-delay", Time.seconds(8.0))
+ Time_Property("tooltip-dismiss-delay", Time.seconds(8.0)) max Time.seconds(0.5)
def setup_tooltips()
{
@@ -230,7 +230,7 @@
def start_session()
{
- val timeout = Time_Property("startup-timeout", Time.seconds(10))
+ val timeout = Time_Property("startup-timeout", Time.seconds(10)) max Time.seconds(5)
val modes = system.getenv("JEDIT_PRINT_MODE").split(",").toList.map("-m" + _)
val logic = {
val logic = Property("logic")