From e75c18383fd0fb2897cbeb412c9e6d15c518e68a Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Fri, 31 Jul 2020 13:58:08 -0300 Subject: [PATCH] Performance tests (windows). --- src/core/windows/event_dispatcher.c | 2 +- src/testprogram/testprogram.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/core/windows/event_dispatcher.c b/src/core/windows/event_dispatcher.c index 3f53d66..4e8c952 100644 --- a/src/core/windows/event_dispatcher.c +++ b/src/core/windows/event_dispatcher.c @@ -199,7 +199,7 @@ retry: { t->in_play = True; - (*t->proc)(hSession); + (*t->proc)(hSession,t->userdata); processed_any = True; lib3270_linked_list_delete_node(&hSession->timeouts,t); diff --git a/src/testprogram/testprogram.c b/src/testprogram/testprogram.c index c58a4c4..47fb497 100644 --- a/src/testprogram/testprogram.c +++ b/src/testprogram/testprogram.c @@ -181,11 +181,17 @@ int main(int argc, char *argv[]) for(f=0;f < 1000; f++) { lib3270_wait_for_ready(h,10); } - printf("Time for 1000 iterations of wait_for_ready was %d\n",(int) (time(0) - start)); + + time_t tm = (time(0) - start); + printf("\n\nTime for 1000 iterations of wait_for_ready was %d\n",(int) tm); + + if(tm > 1) { + exit(-1); + } } - printf("Waiting ends %u\n\n",(unsigned int) time(NULL)); + printf("\n\nWaiting ends %u\n\n",(unsigned int) time(NULL)); lib3270_enter(h); lib3270_wait(h,5); -- libgit2 0.21.2