ShaunRWs Commands
TMR_KillCounter

This command will kill the given counter.

  Syntax
TMR_CounterExist ID
  Parameters
ID
Byte
This is the ID of the timer, This can only be a whole number between 0 and 255.

  Returns

This command does not return a value.

  Description

This command will kill the given counter.

  Example Code
// Starts a count up and count down
TMR_StartCounter 1,0,0
TMR_StartCounter 2,10000,1

Do
	
	CLS
	
	// Get the counter values (milliseconds)
	CountUp = TMR_GetCounter(1)
	CountDown = TMR_GetCounter(2)
	
	Print "ShaunRWs Counter Commands."
	Print ""
	
	// Display counter 1 data
	Print "Counting up:"
	Print "Exist: " + str$(TMR_CounterExist(1))
	Print "Type: " + str$(TMR_GetCounterType(1))
	Print "Milliseconds: " + str$(CountUp)
	Print "Seconds: " + str$(TMR_GetSeconds(CountUp))
	Print "Minutes: " + str$(TMR_GetMinutes(CountUp))
	Print "Hours: " + str$(TMR_GetHours(CountUp))
	Print ""
	
	// Display counter 2 data
	Print "Counting Down:"
	Print "Exist: " + Str$(TMR_CounterExist(2))
	Print "Type: " + str$(TMR_GetCounterType(2))
	Print "Milliseconds: " + str$(CountDown)
	Print "Seconds: " + str$(TMR_GetSeconds(CountDown))
	Print "Minutes: " + str$(TMR_GetMinutes(CountDown))
	Print "Hours: " + str$(TMR_GetHours(CountDown))
	
	// Reset the count down to 10 seconds when it reaches 0
	If CountDown =< 0
		TMR_SetCounter 2,10000
	EndIf
	
	// Kill Timers If space bar was pressed
	If Spacekey()
		TMR_KillCounter 1
		TMR_KillCounter 2
	Endif
	
Loop
  See also

Counter Commands Menu
ShaunRW`s Commands