We only support real time timers. Pretending to support virtual timers
only gets the caller into trouble, since then another signal should be sent. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24363 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
f0c88a50ba
commit
7cee6a817b
@ -24,11 +24,18 @@ getitimer(int which, struct itimerval *value)
|
||||
int
|
||||
setitimer(int which, const struct itimerval *value, struct itimerval *oldValue)
|
||||
{
|
||||
// ToDo: implement me properly!
|
||||
// TODO: implement me properly!
|
||||
// We probably need a better internal set_alarm() implementation to do this
|
||||
|
||||
bigtime_t interval = value->it_interval.tv_sec * USEC_PER_SECOND + value->it_interval.tv_usec;
|
||||
bigtime_t remaining;
|
||||
|
||||
// Only real time timers work at all.
|
||||
if (which != ITIMER_REAL) {
|
||||
errno = B_NOT_SUPPORTED;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (interval != 0)
|
||||
remaining = set_alarm(interval, B_PERIODIC_ALARM);
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user