title: Exact usage of Async.Sleep() in F#
body: <p>I have a question: </p>
  
  <p>I have problem in usage Async.Sleep() method in F#. This is a piece of code in my program:</p>
  
  <pre><code>if (newAngle &lt;&gt; currentAngle) then
      if (newAngle = 0) then
          Motor(MotorPort.OutA).SetSpeed(100y)
          angle1 &lt;- Motor(MotorPort.OutA).GetTachoCount()
          **Async.Sleep(20)**
          angle2 &lt;- Motor(MotorPort.OutA).GetTachoCount()
          speed &lt;- abs(angle2 - angle1)
          distance &lt;- abs(newAngle - angle2)
          if (speed &gt; 11) then
              pwr &lt;- 20L + int64 distance
              if (pwr &lt; 100L) then
                  Motor(MotorPort.OutA).SetSpeed(sbyte pwr)
          while (distance &gt; 30 || angle2 &lt;&gt; angle1) do
              angle1 &lt;- Motor(MotorPort.OutA).GetTachoCount()
              **Async.Sleep(20)**
              angle2 &lt;- Motor(MotorPort.OutA).GetTachoCount()
              speed &lt;- abs(angle2 - angle1)
              distance &lt;- abs(newAngle - angle2)
              if (speed &gt; 11) then
                  pwr &lt;- 20L + int64 distance
                  if (pwr &lt; 100L) then
                      Motor(MotorPort.OutA).SetSpeed(sbyte pwr)
          Motor(MotorPort.OutA).Off() //? off
          **Async.Sleep(300)**
  </code></pre>
  
  <p>I have used Async.Sleep() function in some places in my code. But unfortunately, when I use Async.Sleep() method I get this error:</p>
  
  <pre><code>This expression was expected to have type unitbut here has type Async&lt;unit&gt; 
  </code></pre>
  
  <p>How can I solve this problem?</p>