31#define LOG(kind, ...) GNUNET_log_from (kind, "util-speedup", __VA_ARGS__)
44 static long long current_offset;
51 "Speeding up execution time by %s\n",
80 "Speed up disabled\n");
84 "Speed up execution by %s\n",
87 "Speed up executed every %s\n",
110 "Stopped execution speed up\n");
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
enum GNUNET_GenericReturnValue GNUNET_CONFIGURATION_get_value_time(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option, struct GNUNET_TIME_Relative *time)
Get a configuration value that should be a relative time.
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
@ GNUNET_ERROR_TYPE_DEBUG
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_now_with_lifeness(int lifeness, GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run as soon as possible with the (transitive) ignore-shutdown flag either e...
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_delayed(struct GNUNET_TIME_Relative delay, GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run with a specified delay.
const char * GNUNET_STRINGS_relative_time_to_string(struct GNUNET_TIME_Relative delta, int do_round)
Give relative time in human-readable fancy format.
void GNUNET_TIME_set_offset(long long offset)
Set the timestamp offset for this instance.
static void do_speedup(void *cls)
int GNUNET_SPEEDUP_start_(const struct GNUNET_CONFIGURATION_Handle *cfg)
Start task that may speed up our system clock artificially.
static struct GNUNET_TIME_Relative interval
static struct GNUNET_SCHEDULER_Task * speedup_task
void GNUNET_SPEEDUP_stop_()
Stop tasks that modify clock behavior.
static struct GNUNET_TIME_Relative delta
Entry in list of pending tasks.
Time for relative time used by GNUnet, in microseconds.
uint64_t rel_value_us
The actual value.