All pastes #329631 Raw Edit

Sans titre

public text v1 · immutable
#329631 ·published 2007-01-26 22:11 UTC
rendered paste body
  gettimeofday(&now, NULL);
  tasks[i].when.tv_sec = now.tv_sec + (ms / 1000);
  tasks[i].when.tv_usec = now.tv_usec + ((ms % 1000) * 1000);
  if (tasks[i].when.tv_usec > 1000000) {
    tasks[i].when.tv_sec += 1;
    tasks[i].when.tv_usec -= 1000000;
  }
  nb_tasks ++;

  if (task.taskid == T_TASK_NSRP) {
    log(LVL_DEBUG, "NSRP task for seqnum %d added !", task.pdu.data[1]);
  }
  return 0;
}