TMR_GetHours
This command will convert milliseconds to hours.
Returns Float = TMR_GetHours( Milliseconds )
Milliseconds
DWORD
This is the value of milliseconds that will be converted to minutes.
This will return a float such as 2.5 and will be the hours converted from milliseconds.
This command will convert milliseconds to hours.
// 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
Counter Commands Menu
ShaunRW`s Commands