Nope - sorry my mistake It accepts values as doubles and therefore multiplying them by 1000 to get the time as milliseconds and converting it to a whole number will do the trick. Therefore we just need to make sure that
milliseconds = seconds * 1000; ends up as an int for this to work. On Wed, 20 Feb 2002, J�rg Pommnitz wrote: > I second this. gwthread_sleep does what you want right now or > I'm missing something. > > Regards > J�rg > > -----Original Message----- > From: Oded Arbel > To: Alex Judd; [EMAIL PROTECTED] > Sent: 2/20/02 4:33 PM > Subject: RE: Modification of gwthread_sleep for SMPP throttling > > I don't think I understand. as gwthread_sleep accepts times in double > and not integer, its easy to sleep for less then a second. for example - > I usually use gwthread_sleep(0.1) which sleeps for a tenth of a second. > what's wrong with the current implementation ? > > Oded Arbel > m-Wise Inc. > [EMAIL PROTECTED] > > -- > "Some say life is hell and death an escape, others say heaven awaits us > in the world beyond, but either way I need a new pair of shoes." > -- Privateer. > > > > -----Original Message----- > > From: Alex Judd [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, February 20, 2002 5:20 PM > > To: [EMAIL PROTECTED] > > Subject: Modification of gwthread_sleep for SMPP throttling > > > > > > In order to add (hopefully nice) throttling to the SMPP > > driver I'd like > > to modify the behaviour of the gwthread_sleep function in > > gwthread-pthread.c very slightly. > > > > Currently the function receives the amount of seconds to sleep as a > > double, multiplies it by 1000 to get that value in > > milliseconds and then > > sleeps for that amount of time in milliseconds. > > > > What I'd like to do is if the function recieves a value of < 1 as the > > number of seconds to sleep for, that it instead assumes this > > to be the > > number of milliseconds to sleep for, skips the *1000 part and > > sleeps for > > this time instead. > > > > This way I can sleep nicely for < 1 second periods. > > > > Any objections to this before I do so? > > > > Regards > > > > Alex > > > > -- > > Alex Judd > > http://www.skywire.co.uk/ > > http://www.enpocket.com/ > > > > > > > > > -- Alex Judd http://www.enpocket.com/
