delay

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • WE

    #1

    delay

    Hi!

    I try to find a method which delays the execution of the code for X ms.

    For example:
    xxxx.delay(500) ;

    The method "delay()) does not exist - can you help me to find the correct
    method?

    Thanks!


  • Jon Skeet [C# MVP]

    #2
    Re: delay

    WE <we@mail.com> wrote:
    [color=blue]
    > I try to find a method which delays the execution of the code for X ms.
    >
    > For example:
    > xxxx.delay(500) ;
    >
    > The method "delay()) does not exist - can you help me to find the correct
    > method?[/color]

    Have a look at Thread.Sleep().

    --
    Jon Skeet - <skeet@pobox.co m>
    Pobox has been discontinued as a separate service, and all existing customers moved to the Fastmail platform.

    If replying to the group, please do not mail me too

    Comment

    • Jan Tielens

      #3
      Re: delay

      Try this:
      System.Threadin g.Thread.Sleep( 5000)


      --
      Greetz,
      Jan
      _______________ _______________ ____
      Read my weblog: http://weblogs.asp.net/jan

      "WE" <we@mail.com> schreef in bericht
      news:uY0qZxpuDH A.3496@TK2MSFTN GP11.phx.gbl...[color=blue]
      > Hi!
      >
      > I try to find a method which delays the execution of the code for X ms.
      >
      > For example:
      > xxxx.delay(500) ;
      >
      > The method "delay()) does not exist - can you help me to find the correct
      > method?
      >
      > Thanks!
      >
      >[/color]


      Comment

      • JER

        #4
        delay

        System.Threadin g.Thread.Sleep( 1000); //sleep for 1 second
        [color=blue]
        >-----Original Message-----
        >Hi!
        >
        >I try to find a method which delays the execution of the[/color]
        code for X ms.[color=blue]
        >
        >For example:
        >xxxx.delay(500 );
        >
        >The method "delay()) does not exist - can you help me to[/color]
        find the correct[color=blue]
        >method?
        >
        >Thanks!
        >
        >
        >.
        >[/color]

        Comment

        Working...