changed the return code of mio_gettmrtmout() from -1/0 to 0/1 respectively to avoid unneeded error message manipulation

added mio_add_ntime() and mio_sub_ntime()
This commit is contained in:
2020-09-03 03:56:32 +00:00
parent 6f0b17e2e9
commit 5a05a6e9cd
6 changed files with 158 additions and 11 deletions

View File

@ -757,7 +757,7 @@ int mio_exec (mio_t* mio)
/* wait on the multiplexer only if there is at least 1 active device */
mio_ntime_t tmout;
if (mio_gettmrtmout(mio, MIO_NULL, &tmout) <= -1)
if (mio_gettmrtmout(mio, MIO_NULL, &tmout) <= 0)
{
/* defaults to 0 or 1 second if timeout can't be acquired.
* if this timeout affects how fast the halted device will get killed.