[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux] Re: programmation: génération de trafic.



On Sat, Mar 16, 2002 at 05:51:05PM, Benoit Joseph wrote:
> 
> Quelqu'un connaît-il un moyen d'introduire un délai suffisament précis?
> gettimeofday peut-il m'aider?
nanosleep ?

{
  struct timespec ts;
  ts.tv_sec = del;
  ts.tv_nsec = 0;
  nanosleep(&ts, NULL);
}

> Ben
---end quoted text---

binny

-- 

... et si nous sommes tous embarqués sur la même planète, nous ne
sommes décidement pas du même monde.
    -- Bertrand Cantat

°v°  Benjamin Michotte        <binny@baby-linux.net>
_o_  web      : http://www.baby-linux.net

Attachment: pgp01023.pgp
Description: PGP signature