From 59ffa3e4b433410d945c795069cd183b35d1b4bb Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 13 Jul 2016 14:50:38 +0200 Subject: [PATCH] schedu --- test_crypto.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/test_crypto.c b/test_crypto.c index 62cf263..b3d86db 100644 --- a/test_crypto.c +++ b/test_crypto.c @@ -360,6 +360,31 @@ cleanup_auction_data () free (ad); } +static void +ending (void *arg) +{ + printf ("Good bye!!\n"); +} + + +static void +world (void *arg) +{ + printf ("World!\n"); + GNUNET_SCHEDULER_shutdown (); +} + + +static void +hello (void *arg) +{ + printf ("Hello\n"); + GNUNET_SCHEDULER_add_shutdown (&ending, NULL); + GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, + &world, + NULL); +} + int main (int argc, char *argv[]) @@ -370,6 +395,8 @@ main (int argc, char *argv[]) bidders = 2; prizes = 2 * bidders; + GNUNET_SCHEDULER_run (&hello, NULL); + edc = GNUNET_CRYPTO_ecc_dlog_prepare (1024, 16); BRANDT_init (edc);