In addition to what Foster covered...
if statement comparisons need double equal signs (==).
A single equal sign doesn't compare, it changes the value.
So
if (signal=0)
changes the value of signal to zero, then evaluates
if(0)
which will always be False.
The correct way is:
if (signal==0) {
The 18.5ms is more of a design choice for how often transmission packets are sent. Through the years FIRST has had some variation in packet rates, for instance, the predecessor of the Vex controller used a packet rate of 17ms, and the larger version used for FRC at that time had a rate of 26.2ms.
Whenever you use something like this as a crude timer you'll have to investigate and determine what transmission rate was used.