| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <html>
- <head>
- <title>Blitz3D Docs</title>
- <link rel=stylesheet href=../css/commands.css type=text/css>
- </head>
- <body>
- <h1>FreeTimer (timer_variable)</h1>
- <h1>Parameters</h1>
- <table>
- <tr>
- <td>
- timer = any valid timer variable created with the CreateTimer command.
- </td>
- </tr>
- </table>
- <h1>Description</h1>
- <table>
- <tr>
- <td>
- This command will destroy a timer variable created with the with the CreateTimer command and free the memory it was using. It is a good practice to destroy elements in your game you are no longer using.
- </td>
- </tr>
- </table>
- <h1><a href=../2d_examples/FreeTimer.bb>Example</a></h1>
- <table>
- <tr>
- <td>
- ; Create the timer to track speed
<br />
- frameTimer=CreateTimer(60)
<br />
-
<br />
- ; Your main screen draw loop
<br />
- While Not KeyHit(1)
<br />
- WaitTimer(frameTimer) ; Pause until the timer reaches 60
<br />
- Cls
<br />
- ; Draw your screen stuff
<br />
- Flip
<br />
- Wend
<br />
-
<br />
- ; Kill the timer
<br />
- FreeTimer(frameTimer)
<br />
- </td>
- </tr>
- </table>
- <br>
- <a target=_top href=../index.htm>Index</a><br>
- <br>
- Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=FreeTimer&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
- </html>
|