MODULE; IMPORT ExternalProc; FROM ExternalProc IMPORT Closure, Bind; IMPORT JunoScope; IMPORT JunoArgs, JunoValue; IMPORT Atom, Time; VAR (*CONST*) TimeSym := Atom.FromText("Time"); NowSym := Atom.FromText("Now"); VAR startT: Time.T; PROCEDURE TimeImpl New (): JunoScope.Mod = VAR scp := JunoScope.New(NIL, size := 6); res := NEW(JunoScope.Mod, public_scp := scp, scp := scp); BEGIN ExternalProc.SetupBind(TimeSym, scp); Bind(NowSym, NEW(Closure, invoke := NowProc), in := 0, out := 1); RETURN res END New; PROCEDURENowProc (<*UNUSED*> cl: Closure): BOOLEAN = BEGIN JunoArgs.WriteReal(1, FLOAT(Time.Now() - startT, JunoValue.Real)); RETURN TRUE END NowProc; BEGIN startT := Time.Now() END TimeImpl.