From 25a2a7df5135f59e871ef03a618c4ba7e395b04f Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 2 Nov 2017 20:29:16 +0200 Subject: [PATCH] Test --- iguana/exchanges/LP_nativeDEX.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index aea16362d..4ddda76f3 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -761,13 +761,17 @@ void LP_initpeers(int32_t pubsock,struct LP_peerinfo *mypeer,char *myipaddr,uint void LP_pubkeysloop(void *ctx) { + static uint32_t lasttime; sleep(10); while ( 1 ) { - LP_counter += 100; - //printf("LP_pubkeysloop %d\n",LP_counter); - LP_notify_pubkeys(ctx,LP_mypubsock); - sleep(60); + if ( time(NULL) > lasttime+60 ) + { + printf("LP_pubkeysloop %u\n",(uint32_t)time(NULL)); + LP_notify_pubkeys(ctx,LP_mypubsock); + lasttime = (uint32_t)time(NULL); + } + sleep(3); } }