+
+/**
+ * Schedule a new task to be run with a specified delay. The task
+ * will be scheduled for execution once the delay has expired.
+ *
+ * @param delay when should this operation time out?
+ * @param priority priority to use for the task
+ * @param task main function of the task
+ * @param task_cls closure of @a task
+ * @return unique task identifier for the job
+ * only valid until @a task is started!
+ */
+struct GNUNET_SCHEDULER_Task *
+GNUNET_SCHEDULER_add_delayed_with_priority (struct GNUNET_TIME_Relative delay,
+ enum GNUNET_SCHEDULER_Priority priority,
+ GNUNET_SCHEDULER_TaskCallback task,
+ void *task_cls)
+{
+ return GNUNET_SCHEDULER_add_at_with_priority (GNUNET_TIME_relative_to_absolute (delay),
+ priority,
+ task,
+ task_cls);
+}
+
+
+/**
+ * Schedule a new task to be run with a specified priority.
+ *
+ * @param prio how important is the new task?
+ * @param task main function of the task
+ * @param task_cls closure of @a task
+ * @return unique task identifier for the job
+ * only valid until @a task is started!
+ */
+struct GNUNET_SCHEDULER_Task *
+GNUNET_SCHEDULER_add_with_priority (enum GNUNET_SCHEDULER_Priority prio,
+ GNUNET_SCHEDULER_TaskCallback task,
+ void *task_cls)
+{
+ return GNUNET_SCHEDULER_add_delayed_with_priority (GNUNET_TIME_UNIT_ZERO,
+ prio,
+ task,
+ task_cls);
+}
+
+
+/**
+ * Schedule a new task to be run at the specified time. The task
+ * will be scheduled for execution once specified time has been
+ * reached. It will be run with the DEFAULT priority.
+ *
+ * @param at time at which this operation should run
+ * @param task main function of the task
+ * @param task_cls closure of @a task
+ * @return unique task identifier for the job
+ * only valid until @a task is started!
+ */
+struct GNUNET_SCHEDULER_Task *
+GNUNET_SCHEDULER_add_at (struct GNUNET_TIME_Absolute at,
+ GNUNET_SCHEDULER_TaskCallback task,
+ void *task_cls)
+{
+ return GNUNET_SCHEDULER_add_at_with_priority (at,
+ GNUNET_SCHEDULER_PRIORITY_DEFAULT,
+ task,
+ task_cls);