Sleep

Question: Define a function 'sleep' that behaves similarly to the Unix system command 'sleep'. The function should receive a 'time' as the input argument.

More Information:

https://en.wikipedia.org/wiki/Sleep_(command)

Example

                                
                                q)\t sleep each 1e3*1 2 5 / seconds
7999
q)\t sleep 500 / millis
499
                                
                            

Solution

Tags:
functions
Searchable Tags
algorithms api architecture asynchronous c csv data structures dictionaries disk feedhandler finance functions ingestion ipc iterators machine learning math multithreading optimizations realtime shared library sql statistics streaming strings tables temporal utility websockets