ShaunRWs Commands
TMR_GetPerfCounter

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

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

This will return a Double Integer such as 1. This number is the amount of ticks that have occurred since the system was turned on.

  Description

This command will return the current value of the high-resolution performance counter. If you divide this value by the value returned by TMR_GetPerfFrequency, you will get the amount of seconds past since the system was powered on.

  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