ns_event wait eventid lockid ?timeout?
ns_event create initializes an event and returns an event ID for the new event.
ns_event destroy frees the resources associated with the specified event. The eventid argument is the event ID returned by ns_event create when the event was created.
ns_event set wakes up the specified event. The eventid argument is the event ID returned by ns_event create when the event was created.
ns_event wait waits for the specified event for a specified time. The eventid argument is the event ID returned by ns_event create when the event was created. The lockid argument is the id of either a mutex lock or a semaphore lock. The timeout argument is the time to wait in seconds.