Millisecs.htm 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <html>
  2. <head>
  3. <title>Blitz3D Docs</title>
  4. <link rel=stylesheet href=../css/commands.css type=text/css>
  5. </head>
  6. <body>
  7. <h1>Millisecs()</h1>
  8. <h1>Parameters</h1>
  9. <table>
  10. <tr>
  11. <td>
  12. None
  13. </td>
  14. </tr>
  15. </table>
  16. <h1>Description</h1>
  17. <table>
  18. <tr>
  19. <td>
  20. This command will return to you the system timer value in milliseconds. <br />
  21. <br />
  22. This is incredibly useful for precision timing of events. By reading this value into a variable, and checking it against the CURRENT time in milliseconds, you can perform 'waits' or check time lapses with a high degree of accuracy. A common use of this command is to seed the random number generator with the SeedRnd command.
  23. </td>
  24. </tr>
  25. </table>
  26. <h1><a href=../2d_examples/Millisecs.bb>Example</a></h1>
  27. <table>
  28. <tr>
  29. <td>
  30. ; This prints STILL WAITING! for three seconds then ends. <br />
  31. oldTime=MilliSecs() <br />
  32. While MilliSecs() < oldTime + 3000 <br />
  33. Print "Still waiting!" <br />
  34. Wend <br />
  35. </td>
  36. </tr>
  37. </table>
  38. <br>
  39. <a target=_top href=../index.htm>Index</a><br>
  40. <br>
  41. Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=Millisecs&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
  42. </html>