remove gn scheduler example

This commit is contained in:
Markus Teich 2016-07-20 11:36:34 +02:00
parent 132fe0d4df
commit 1fcad30bea

View File

@ -361,42 +361,6 @@ cleanup_auction_data ()
} }
static struct GNUNET_SCHEDULER_Task *wt;
static void
ending (void *arg)
{
printf ("Good bye!!\n");
GNUNET_SCHEDULER_cancel (wt);
}
static void
world (void *arg)
{
static int c;
c++;
printf ("World!\n");
wt = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
&world,
NULL);
if (11 == c)
GNUNET_SCHEDULER_shutdown ();
}
static void
hello (void *arg)
{
printf ("Hello\n");
GNUNET_SCHEDULER_add_shutdown (&ending, NULL);
wt = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
&world,
NULL);
}
int int
main (int argc, char *argv[]) main (int argc, char *argv[])
{ {
@ -406,31 +370,29 @@ main (int argc, char *argv[])
bidders = 2; bidders = 2;
prizes = 2 * bidders; prizes = 2 * bidders;
GNUNET_SCHEDULER_run (&hello, NULL);
edc = GNUNET_CRYPTO_ecc_dlog_prepare (1024, 16); edc = GNUNET_CRYPTO_ecc_dlog_prepare (1024, 16);
BRANDT_init (edc); BRANDT_init (edc);
/* tests that need to run only once */ /* tests that need to run only once */
run (test_smc_2d_array); run (test_smc_2d_array);
run (test_smc_3d_array); run (test_smc_3d_array);
run (test_serialization);
for (tests_run = 0; tests_run < repeat; tests_run++) for (tests_run = 0; tests_run < repeat; tests_run++)
{ {
run (test_serialization);
run (test_smc_zkp_dl); run (test_smc_zkp_dl);
run (test_smc_zkp_2dle); run (test_smc_zkp_2dle);
run (test_smc_zkp_0og); run (test_smc_zkp_0og);
run (test_setup_auction_data);
run (test_prologue);
run (test_round1);
run (test_round2);
run (test_round3);
run (test_outcome);
cleanup_auction_data ();
} }
run (test_setup_auction_data);
run (test_prologue);
run (test_round1);
run (test_round2);
run (test_round3);
run (test_outcome);
cleanup_auction_data ();
GNUNET_CRYPTO_ecc_dlog_release (edc); GNUNET_CRYPTO_ecc_dlog_release (edc);
return ret; return ret;
} }