XBEE INFRARED SENSOR

Hi,
I'm trying to create a project with Xbee and an infrared remote sensor using a simple infrared LED and a IR receiver TSOP2236 . I'm trying to translate the Arduino simple code: "Simple IR Distance Sensor Tutorial (Arduino Playground - PanasonicIrSensor) to XBee-language API.
I am a Xbee newbie and I have some problem to use the delayMicroseconds function (does not exist in processing).
Has anyone had a similar experience?
hello and thanks
Sylvan