Exemple #1
0
        protected override Completion ExecuteImpl(ExecutionEnvironment enviroment)
        {
            var c = Duration.Execute(enviroment);

            if (c.Type != CompletionType.Value)
            {
                return(c);
            }
            try
            {
                float t = TypeConverters.GetValue <float>(c.ReturnValue);
                Thread.Sleep((int)(t * 1000));
            }catch (Exception e)
            {
                return(new Completion(e.Message, CompletionType.Exception));
            }
            return(Completion.Void);
        }