EasyManua.ls Logo

Crestron SIMPL+ - GETHSECONDS 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 247
GETHSECONDS
Name:
GetHSeconds
Syntax:
INTEGER GetHSeconds();
Description:
Returns an integer corresponding to the number of hundredths of a second based on
the system clock. Typically, this function could be used for very fine timing, to
determine if a specific amount of time has elapsed.
Parameters:
None.
Return Value:
The number of hundredths of a second based on the system clock.
Example:
INTEGER OldTime, NewTime, Loop;
Loop=0;
OldTime=GETHSECONDS();
WHILE(Loop < 10000)
{
Loop = Loop + 1
}
NewTime=GETHSECONDS();
PRINT (“Elapsed Time is %d hundredths of a second.\n”,
Newtime-OldTime);
The output of this code would be “Elapsed Time is 400 hundredths of a second.”
Version:
SIMPL+ Version 1.00
NOTE: This is bad programming as it ties up the CPU.

Table of Contents