SharpLibEar/ActionSleep.cs
author StephaneLenclud
Sun, 24 Jul 2016 20:46:34 +0200
changeset 215 5de8f8eaaa54
parent 210 83dd86e73448
child 219 99c407831232
permissions -rw-r--r--
Removing obsolete CEC options.
     1 //
     2 
     3 
     4 using System.Runtime.Serialization;
     5 using System.Threading;
     6 
     7 
     8 namespace SharpLib.Ear
     9 {
    10     
    11 
    12     [DataContract]
    13     [AttributeAction(Id = "Thread.Sleep", Name = "Sleep", Description = "Have the current thread sleep for the specified amount of milliseconds.")]
    14     public class ActionSleep : Action
    15     {
    16         [DataMember]
    17         private readonly int iMillisecondsTimeout;
    18 
    19         public ActionSleep()
    20         {
    21             iMillisecondsTimeout = 1000;
    22         }
    23 
    24 
    25         public ActionSleep(int aMillisecondsTimeout)
    26         {
    27             iMillisecondsTimeout = aMillisecondsTimeout;
    28         }
    29 
    30         public override void Execute()
    31         {
    32             Thread.Sleep(iMillisecondsTimeout);
    33         }
    34 
    35     }
    36 
    37 
    38 
    39 }