home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 63 / CDACTUAL63.iso / Aplicaciones / DarkBasic / DemoDarkBasic.exe / help / examples / flow / exam12.dba < prev    next >
Encoding:
Text File  |  2000-01-24  |  923 b   |  43 lines

  1. Rem * Title  : TIMER Commands
  2. Rem * Author : DBS-MB
  3. Rem * Date   : 1st August 1999
  4. rem ===========================================================
  5. rem DARK BASIC EXAMPLE PROGRAM 12
  6. rem ===========================================================
  7. rem This program will show you how to use the time commands
  8. rem -----------------------------------------------------------
  9.  
  10. rem Set the ink to white and paper color to black 
  11. ink rgb(244,214,210),1
  12.  
  13. rem Display the current date and time
  14. print "DATE:";get date$()
  15. print "TIME:";get time$()
  16. print
  17.  
  18. rem Your can use the timer() command
  19. rem to see how long parts of your program is takeing
  20.  
  21. rem Get time in milliseconds
  22. a=timer()
  23.     
  24. rem Call gosub mylabel
  25. gosub mylabel
  26.     
  27. rem How many millisecond gosub has taken
  28. b=(timer()-a)
  29.  
  30. print "THIS GOSUB TOOK ",b," MILLISECONDS"
  31.     
  32. rem End of program
  33. end
  34.  
  35.  
  36. mylabel:
  37.  
  38. for t=1 to 1000
  39. next t
  40.  
  41. return
  42.  
  43.