EasyManua.ls Logo

Crestron SIMPL+ - GETTICKS Function

Crestron SIMPL+
374 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Crestron SIMPL+
®
Software
Language Reference Guide - DOC. 5797G SIMPL+
®
z 251
GETTICKS
Name:
GetTicks
Syntax:
INTEGER GetTicks();
Description:
Returns an integer corresponding to the number of system ticks. Each tick is 1/112.5
seconds on an X-generation control system, or 0.01 seconds on a 2-series control
system. Typically, this function could be used for very fine timing, to determine if a
specific amount of time has elapsed. The use of this function is discouraged,
GetHSeconds() should be used instead.
Parameters:
None.
Return Value:
The number of ticks in the clock.
Example:
INTEGER OldTime, NewTime, Loop;
Loop=0;
OldTime=GETTICKS();
WHILE(Loop < 10000)
{
Loop = Loop + 1;
}
NewTime=GETTICKS();
PRINT(“Elapsed Time is %d ticks\n”, Newtime-OldTime);
An example output from this code fragment would be “Elapsed Time is 7000 ticks”.
Version:
SIMPL+ Version 1.00
NOTE: This is bad programming as it ties up the CPU.

Table of Contents