Files
harbour-core/harbour/tests/ticktime.prg
Viktor Szakats 58255adfe5 2011-09-07 18:32 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* doc/howtosvn.txt
    + added extra rules to "1.3 Here's how to format your ChangeLog entries"
      section.
    * Change markup is not optional anymore, pls stick to it.

  * contrib/hbcups/tests/test.prg
  * contrib/hbcups/readme.txt
    + Added more test code and extra info to hbcups.
      Update provided by Dr. Claudia Neumann (with my minor fixes/formatting).
      Many thanks!

  * contrib/hbpgsql/rddcopy.c
  * contrib/hbpgsql/hbpgsql.h
    ! svn props

  * tests/testtok.prg
  * tests/testrdd.prg
  * tests/tstchbx.prg
  * tests/tstblock.prg
  * tests/ticktime.prg
  * tests/testvars.prg
  * tests/tstasort.prg
  * tests/testprof.prg
  * tests/testread.prg
  * tests/testrpt.prg
  * tests/teststr.prg
    * formatting.
2011-09-07 16:33:53 +00:00

28 lines
763 B
Plaintext

/*
* $Id$
*/
PROCEDURE Main()
LOCAL nTime0, nTime, nTimeLast, nMin := 9999, nMax := - 9999, nTick := 0, nLoop := 0
? "Wait for 10 seconds..."
nTimeLast := nTime0 := HB_MILLISECONDS()
DO WHILE ( nTime := HB_MILLISECONDS() ) - nTime0 < 10000
IF nTimeLast != nTime
nTick++
nMin := Min( nMin, nTime - nTimeLast )
nMax := Max( nMax, nTime - nTimeLast )
nTimeLast := nTime
ENDIF
nLoop++
ENDDO
nTime := nTimeLast - nTime0
? "Ticks per second:", LTrim( Str( nTick * 1000/ nTime, 12, 3 ) )
? "Min/avg/max interval (ms):", LTrim( Str( nMin, 9, 3 ) ), "/", ;
LTrim( Str( nTime / nTick, 9, 3 ) ), "/", ;
LTrim( Str( nMax, 9, 3 ) )
? "Loops per tick:", nLoop / nTick
RETURN