(trunk libT) new utility function tr_timerAddMsec()

This commit is contained in:
Charles Kerr
2009-12-10 19:04:10 +00:00
parent a9cabe918c
commit 0f14f62ac1
3 changed files with 16 additions and 14 deletions

View File

@@ -499,6 +499,14 @@ tr_timerAdd( struct event * timer, int seconds, int microseconds )
event_add( timer, &tv );
}
void
tr_timerAddMsec( struct event * timer, int msec )
{
const int seconds = msec / 1000;
const int usec = (msec%1000) * 1000;
tr_timerAdd( timer, seconds, usec );
}
/**
***
**/