RE: How to wait miliseconds



Dimitar Haralanov wrote:
On Fri, 05 Dec 2003 18:39:54 +0100
GÃnther Rapp <guenther rapp-informatik de> wrote:


I am searching for a g_lib or system call to wait 10 or 100
miliseconds in a thread path
the sleep(1)   is too long  i need no second


    how about usleep?

void g_usleep (gulong microseconds); (from Glib)


Also, it might be worth noting that you can use G_USEC_PER_SEC (I think) which defines the number of micro 
seconds per second.  This way 200 milliseconds would look like this:

        g_usleep(G_USEC_PER_SEC * 0.2);


Regards,
Martyn


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