Out of memory, how to reduce this program's size

Is the function smartDelay() really smart or is it just me that's not smart.

It sounds like it could do an awful lot of gps.encode()s - whatever they do.

...R