num = time([secs])
If no argument is given, the time() function returns the current time of day as the (integer) microseconds since the UNIX epoch (1970/1/1). If a non-zero real number is given it is used to set a countdown timer, based on the best available real time clock. Once the given (fractional) number of seconds have elapsed, a SIGALRT is passed to the program and can be tested for with errno() and strerror(). If a timer is already active, it is cancelled, and a new one is started using the new value. If this value is zero, any existing timer is merely cancelled, without starting a new one. If successful, true is returned and the program continues to execute while the timer counts down to zero. When SIGALRM is received, it is noted by the JSUS shell and, typically, the current (or subsequent) call fails, returning a null with errno set to EINTR. This must be tested for by the program. As a special case, strerror() will return "SIGALRT" if this signal was received. If the time() call itself fails, a null is returned, with errno set to an appropriate value. If SIGALRT occurs during a get() or put(), after data transfer has begun, the call will complete, without error, returning the partial transfer. However, errno will still be set and strerror() will still return "SIGALRT". The SIGALERT can also be caught by the wait() function.