libc/time: Add an implementationof clock()

This commit is contained in:
Gregory Nutt
2018-03-13 08:07:29 -06:00
parent f62bfca94e
commit 1a990f99d1
11 changed files with 100 additions and 21 deletions
+7 -7
View File
@@ -136,15 +136,15 @@ static int psock_socketlevel_option(FAR struct socket *psock, int option,
* is outside of the scope of getsockopt.
*/
case SO_DEBUG: /* Enables recording of debugging information */
case SO_BROADCAST: /* Permits sending of broadcast messages */
case SO_REUSEADDR: /* Allow reuse of local addresses */
case SO_DEBUG: /* Enables recording of debugging information */
case SO_DONTROUTE: /* Requests outgoing messages bypass standard routing */
#ifndef CONFIG_NET_TCPPROTO_OPTIONS
case SO_KEEPALIVE: /* Verifies TCP connections active by enabling the
* periodic transmission of probes */
#endif
case SO_OOBINLINE: /* Leaves received out-of-band data inline */
case SO_DONTROUTE: /* Requests outgoing messages bypass standard routing */
case SO_REUSEADDR: /* Allow reuse of local addresses */
{
sockopt_t optionset;
@@ -254,14 +254,14 @@ static int psock_socketlevel_option(FAR struct socket *psock, int option,
}
break;
/* The following are not yet implemented */
/* The following are not yet implemented (return values other than {0,1) */
case SO_ACCEPTCONN: /* Reports whether socket listening is enabled */
case SO_LINGER:
case SO_SNDBUF: /* Sets send buffer size */
case SO_RCVBUF: /* Sets receive buffer size */
case SO_ERROR: /* Reports and clears error status. */
case SO_LINGER: /* Lingers on a close() if data is present */
case SO_RCVBUF: /* Sets receive buffer size */
case SO_RCVLOWAT: /* Sets the minimum number of bytes to input */
case SO_SNDBUF: /* Sets send buffer size */
case SO_SNDLOWAT: /* Sets the minimum number of bytes to output */
default: