diff options
Diffstat (limited to 'test/tight-1.c')
-rw-r--r-- | test/tight-1.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/tight-1.c b/test/tight-1.c index 825ca83..987d481 100644 --- a/test/tight-1.c +++ b/test/tight-1.c @@ -1,9 +1,11 @@ +#include <time.h> #include <rfb/rfb.h> #include <rfb/rfbclient.h> int main(int argc,char** argv) { int i,j; + time_t t=time(0); rfbScreenInfoPtr server=rfbGetScreen(&argc,argv,400,300,8,3,4); rfbClient* client=rfbGetClient(&argc,argv,8,3,4); @@ -13,7 +15,7 @@ int main(int argc,char** argv) server->frameBuffer[j]=j; //server->maxRectsPerUpdate=-1; rfbInitServer(server); - while(1) { + while(time(0)-t<20) { for(j=0;j<400;j+=10) for(i=0;i<300;i+=10) @@ -21,5 +23,10 @@ int main(int argc,char** argv) rfbProcessEvents(server,5000); } + + free(server->frameBuffer); + rfbScreenCleanup(server); + rfbClientCleanup(client); + return(0); } |