Name

nano_clock, nano_dclock, nano_dtime, nano_stime, nano_mtime, nano_ctime, set_begin_frame_handler, set_end_frame_handler, set_message_handler, set_channeled_message_handler, send_message, send_channeled_message, teleport_to — functions mostly for interacting with system

Common stuff

In functions nano_clock, nano_dclock, nano_dtime, nano_stime, nano_mtime and nano_ctime time is stored in table {sec = seconds, nsec = nano_seconds}. Both seconds and nano_seconds are integer values. If not, behavior is undefined.

Description

nano_clock ();

Returns time passed since environment initialization (it happens after connection establishment).

nano_dclock ();

Returns time passed since last call of nano_dclock or if it is called first time behaves excactly like nano_clock.

nano_dtime (time1, time2);

Returns time1 - time2.

nano_stime (time1, time2);

Returns time1 + time2.

nano_mtime (time, coef);

Returns time * coef.

nano_ctime (time1, time2);

Returns true if time1 > time2, false if time1 < time2 and nil if time1 = time2.

Set function name (string) to be called before frame rendering. There are no parameters passed to that function.

Set function name (string) to be called after frame rendering. There'are no parameters passed to that function.

Set function name (string) to be called when message came from server to Lua environment. Data string is passed to that function.

Set function name (string) to be called when channeled message came from server to Lua environment. Channel ID and data string is passed to that function.

send_message (data);

Sends message data (string) to server.

Sends channeled message data (string) to channel id to server.

teleport_to (host, port, room);

Makes teleport request for connection to room of port of host.