Functions
Unistd.h functions

This header provides functions ported from Unix in unistd.h. More...

Functions

EVIL_API double evil_time_get (void)
 Return the time spent since the Evil library has been initialized. More...
 
EVIL_API int evil_sockets_init (void)
 Initiates the use of Windows sockets. More...
 
EVIL_API void evil_sockets_shutdown (void)
 Shutdown the Windows socket system. More...
 
EVIL_API int evil_pipe (int *fds)
 Create a pair of sockets. More...
 

Detailed Description

This header provides functions ported from Unix in unistd.h.

Function Documentation

◆ evil_time_get()

EVIL_API double evil_time_get ( void  )

Return the time spent since the Evil library has been initialized.

Returns
The time spent since the Evil library has been initialized.

This function returns the time spent since the Evil library has been initialized. It uses a high-resolution timer and then can have a precision up to the nano-second. The precision is processor dependant. This function can be used to benchmark parts of code in with high precision.

Conformity: Not appliclable.

Supported OS: Windows XP.

◆ evil_sockets_init()

EVIL_API int evil_sockets_init ( void  )

Initiates the use of Windows sockets.

Returns
1 on success, 0 otherwise.

Initiates the use of Windows sockets. If the function succeeds, it returns 1, otherwise it returns 0.

Conformity: Non applicable.

Supported OS: Windows XP.

Referenced by evil_init().

◆ evil_sockets_shutdown()

EVIL_API void evil_sockets_shutdown ( void  )

Shutdown the Windows socket system.

Shutdown the Windows socket system.

Conformity: Non applicable.

Supported OS: Windows XP.

Referenced by evil_shutdown().

◆ evil_pipe()

EVIL_API int evil_pipe ( int *  fds)

Create a pair of sockets.

Parameters
fdsA pointer that contains two sockets.

Create a pair of sockets that can be use with select(). Hence, evil_sockets_init() must have been caled at least once before. Contrary to Unix, that functions does not create a pair of file descriptors.

Conformity: Not applicable.

Supported OS: Windows XP.