I think Gang Liu wrote: > hi, > Thanks for answering my questions in advace. > > Q1: > Would u please tell us which file implments Jess' function "call"?
Manual chapter 8, which lists and describes each function, also lists a package for each; this tell syou where the source for that function is located. For "call", it says "ReflectFunctions" -- i.e., jess/ReflectFunctions.java, where most of the reflection stuff is. > > Q2: > Whether the following rule let Jess engine idle 25 milliseconds? > > (defrule sleep-if-bored > (declare (salience -100)) > ?idle <- (idle) > => > (retract ?idle) > (call Thread sleep 25) > (assert (idle))) Well, it does what it says. If there's nothing else to do, then retract the "idle" fact, sleep for 25 ms, and assert a new "idle" fact. Note that this kind of busy-waiting is no longer generally necessary; using "run-until-halt" is better, as it doesn't waste CPU time. > > thanks > Tim > --------------------------------------------------------- Ernest Friedman-Hill Distributed Systems Research Phone: (925) 294-2154 Sandia National Labs FAX: (925) 294-2234 Org. 8920, MS 9012 [EMAIL PROTECTED] PO Box 969 http://herzberg.ca.sandia.gov Livermore, CA 94550 -------------------------------------------------------------------- To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]' in the BODY of a message to [EMAIL PROTECTED], NOT to the list (use your own address!) List problems? Notify [EMAIL PROTECTED] --------------------------------------------------------------------
