static bool waitForVarToChange_withTimeout(Var v, A knownValue, long timeout) ctex {
synchronized(v) {
long destTime = sysNow()+timeout, remainingTime;
while ((remainingTime = destTime-sysNow()) > 0) {
if (neq(knownValue, v!)) true;
v.wait(remainingTime);
}
false;
}
}