From ade872095c36d44ca30ae8a3854e39a2566de4dc Mon Sep 17 00:00:00 2001 From: Ryszard Glab Date: Sun, 25 Jun 2000 08:38:35 +0000 Subject: [PATCH] ChangeLog 2000-06-25 10:40 UTC+0100 --- harbour/ChangeLog | 5 +++++ harbour/tests/onidle.prg | 46 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 harbour/tests/onidle.prg diff --git a/harbour/ChangeLog b/harbour/ChangeLog index bee4e4d937..2164e3b50d 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,8 @@ +2000-06-25 10:40 UTC+0100 Ryszard Glab + + *tests/onidle.prg + *added missing demo file of idle states tasks + 2000-06-25 05:30 GMT -3 Luiz Rafael Culik *contrib/hbzlib/zlibapi.c *Small change to hb___CompressMultipleFile() diff --git a/harbour/tests/onidle.prg b/harbour/tests/onidle.prg new file mode 100644 index 0000000000..87c14f2aad --- /dev/null +++ b/harbour/tests/onidle.prg @@ -0,0 +1,46 @@ +// +// $Id$ +// +#include "hbmemory.ch" + +FUNCTION MAIN +LOCAL nH1, nH2, nH3, nH4 +LOCAL n:=0 +LOCAL aSign:={"|", "/", "-", "\" } +LOCAL nPrev:=SECONDS() + + CLS + ? " Time: Memory used: Miliseconds elapsed" + ? + ? "Can you see it ??? :) Press ESC or wait 5 seconds" + ? + ? + nH1 = HB_ADDIDLE( {|| DEVPOS(0,01), DEVOUT( TIME() )} ) + nH2 = HB_ADDIDLE( {|| DEVPOS(0,21), TEST(), DEVOUT( MEMORY(HB_MEM_USED) )} ) + nH3 = HB_ADDIDLE( {|| DEVPOS(0,41), IIF(n=4,n:=1,n++),DEVOUT(aSign[n]) } ) + nH4 = HB_ADDIDLE( {|| DEVPOS(0,61), DEVOUT( 1000*(SECONDS()-nPrev) ), nPrev:=SECONDS()} ) + + INKEY( 10 ) + HB_DELIDLE( nH3 ) + HB_DELIDLE( nH2 ) + HB_DELIDLE( nH1 ) + HB_DELIDLE( nH4 ) + +RETURN 1 + +PROC TEST() +LOCAL a, b +LOCAL cb + + a := ARRAY( 2 ) + b := ARRAY( 2 ) + a[1] :=a + a[2] :=b + b[1] :=b + b[2] :=a + + cb := {|x| IIF( x>10, IIF(x=0,0,EVAL(cb,x-1)), DEVOUT(x))} +// EVAL( cb, 20 ) +// INKEY( .5 ) + +RETURN \ No newline at end of file