home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / n / newsflash / !BBS / BBS / Notes / Usefulbits / Usage < prev   
Encoding:
Text File  |  1996-07-09  |  700 b   |  37 lines

  1. {
  2. | Processor usage monitor
  3. | By Chris Davis
  4.  
  5. REPORT "Processor usage"
  6. STD CLS
  7. BFG 2
  8. PRINT "Processor usage monitor "
  9. BFG 1 PRINT "-" BFG 4
  10. PRINT "by Chris Davis [ESCAPE to EXIT]" NL
  11. BFG 6
  12. PRINT "0%                 25%                 50%                  75%             100%" NL
  13. BFG 5
  14. PRINT "|                   |                   |                    |                 |" NL
  15. REPEAT
  16.   start%=TIMER
  17.   WAIT
  18.   calls%=calls%+1
  19.   usage%=(usage%+(TIMER-start%))/2
  20.   LOCATE 0,6
  21.   PRINT "Last call: "
  22.   PRINT TIMER-start% CLL
  23.   LOCATE 0,4
  24.   IF usage%>80 THEN
  25.     lusage%=80
  26.   ELSE
  27.     lusage%=usage%
  28.   ENDIF
  29.   REPEAT
  30.     BFG 1
  31.     }Û{
  32.     lusage%=lusage%-1
  33.   UNTIL lusage%<=0
  34.   CLL
  35.   INKEY k
  36. UNTIL k<>""
  37. }