ShaunRWs Commands
TMR_GetPerfFrequency

This command will return the frequency of the high-resolution performance counter.

  Syntax
Returns Double Integer = TMR_GetPerfFrequency( *No Parameters* )
  Returns

This will return a Double Integer such as 1. This number is the amount of ticks That occures every second.

  Description

This command will return the current value of the high-resolution performance counter. This command will return the frequency of the high-resolution performance counter. By taking the value of the TMR_GetPerfCounter and dividing by the frequency, you get the number of seconds that have elapsed since the system was turned on. This value will not change at any time when the system is running, so you will only need to call this command once.

  Example Code
// Because the values returned by these functions are high-res, we need to
// define the variables as double integers or we will get incorrect values.
Freq as Double Integer
Ticks as Double Integer

// Get the amount of ticks per second
Freq = TMR_GetPerfFrequency()

Do
	CLS
	
	// Get the current amount of ticks
	Ticks = TMR_GetPerfCounter()
	
	// Calculate Seconds since power on by dividing Ticks by the Freqency
	Seconds = Ticks / Freq

	// display seconds since power on
	Print "Seconds since power on: ",str$(Seconds)
	
Loop
  See also

Counter Commands Menu
ShaunRW`s Commands