Undocumented Scripting keywork 'time'

Hi all,

This email is about RTT 1.10.

I was trying to add a method 'time' to my component while a discovered
that 'time' was a scripting keyword.

I didn't found anything about it, it is completely undocumented!!!!

Looking briefly to the code, I discovered it is related to the
possibility to use 's', 'ms', 'us' in scripting to specify time units
(which will be very useful for me to set up time-outs and periods).

Does anyone know what the keyword 'time' is used for? Is anyone using it?

Regards,

Charles.

Undocumented Scripting keywork 'time'

On Thu, Nov 18, 2010 at 2:48 PM, Charles Lesire-Cabaniols
<Charles [dot] Lesire [..] ...> wrote:
> Hi all,
>
> This email is about RTT 1.10.
>
> I was trying to add a method 'time' to my component while a discovered
> that 'time' was a scripting keyword.
>
> I didn't found anything about it, it is completely undocumented!!!!
>
> Looking briefly to the code, I discovered it is related to the
> possibility to use 's', 'ms', 'us' in scripting to specify time units
> (which will be very useful for me to set up time-outs and periods).
>
> Does anyone know what the keyword 'time' is used for? Is anyone using it?

It's doomed to be removed. It's possible to write in 1.x:

do command() until { if time > 1s then ... }

The part after 'then' was calling a function or the word 'done'. It's crapy
syntax which I assume we removed from the manual. The scripting code
is still in there for the sake of backwards compatibility, but I think no one
is using it. So don't be tempted.

It's better to write a service/component that manages timing, similar
to the TimerComponent.

Peter