Getticks - Crestron SIMPL+ Reference Manual

Language reference guide
Hide thumbs Also See for SIMPL+:
Table of Contents

Advertisement

Crestron SIMPL+
Language Reference Guide - DOC. 5797G
®

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".
NOTE: This is bad programming as it ties up the CPU.
Version:
SIMPL+ Version 1.00
Software
®
SIMPL+
251

Advertisement

Table of Contents
loading

Table of Contents