delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/07/06:58:38

Message-ID: <01BC5AE1.9EF92200@r1p048.ntt.it>
From: Paolo Lattanzi <p DOT lattanzi AT ideasys DOT com>
To: "'djgpp AT delorie DOT com'" <djgpp AT delorie DOT com>
Subject: time pause under WIN95
Date: Wed, 7 May 1997 10:36:29 +-200
Encoding: 20 TEXT

Many days ago, I had the same problem.

My source was developped under XENIX, so I used the function "nap(ms)" to sleep a number o millisec.

I have written this function, that works fine, even under Windows 95:

               idea_nap(millisecondi)
                long millisecondi;
                {
                struct tms x;
                long i2,i1;

                i1=times(&x);
                i2=times(&x);
                while ((i2-i1) < (millisecondi * CLK_TCK) / 1000 )
                        i2=times(&x);
                return(1);
                }

bye

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019