protected override JavaScriptObject Execute(SourcePosition pos, Scope scope, JavaScriptObject thisObject) { JavaScriptInteger sleeptime = scope.GetVariable("milliseconds", pos).ToInteger(); Thread.Sleep(sleeptime.Value); return(sleeptime); }
public IntegerNode(SourcePosition pos, int number) : base(pos) { this.number = new JavaScriptInteger(number); }
public override int CompareTo(JavaScriptObject obj) { JavaScriptInteger number = (JavaScriptInteger)obj; return(value.CompareTo(number.value)); }
public JavaScriptInteger Power(JavaScriptInteger n) { return(new JavaScriptInteger(Convert.ToInt32(Math.Pow(value, n.value)))); }
public JavaScriptInteger Remainder(JavaScriptInteger divisor) { return(new JavaScriptInteger(value % divisor.value)); }
public JavaScriptInteger Divide(JavaScriptInteger divisor) { return(new JavaScriptInteger(value / divisor.value)); }
public JavaScriptInteger Multiply(JavaScriptInteger multiplicand) { return(new JavaScriptInteger(value * multiplicand.value)); }
public JavaScriptInteger Subtract(JavaScriptInteger subtrahend) { return(new JavaScriptInteger(value - subtrahend.value)); }
public JavaScriptInteger Add(JavaScriptInteger augend) { return(new JavaScriptInteger(value + augend.value)); }
public JavaScriptInteger Multiply(JavaScriptInteger multiplicand) { return new JavaScriptInteger(value * multiplicand.value); }
public JavaScriptInteger Divide(JavaScriptInteger divisor) { return new JavaScriptInteger(value / divisor.value); }
public JavaScriptInteger Add(JavaScriptInteger augend) { return new JavaScriptInteger(value + augend.value); }
public JavaScriptInteger Subtract(JavaScriptInteger subtrahend) { return new JavaScriptInteger(value - subtrahend.value); }
public JavaScriptInteger Remainder(JavaScriptInteger divisor) { return new JavaScriptInteger(value % divisor.value); }
public JavaScriptInteger Power(JavaScriptInteger n) { return new JavaScriptInteger(Convert.ToInt32(Math.Pow(value, n.value))); }