Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
unistd.h File Reference
#include <stdlib.h>
#include <io.h>
#include <getopt.h>
#include <process.h>
#include <direct.h>
#include <sys/types.h>
#include <sys/stat.h>
+ Include dependency graph for unistd.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define inline   __inline
 
#define __func__   __FUNCTION__
 
#define srandom   srand
 
#define random   rand
 
#define R_OK   4 /* Test for read permission. */
 
#define W_OK   2 /* Test for write permission. */
 
#define F_OK   0 /* Test for existence. */
 
#define access   _access
 
#define dup2   _dup2
 
#define execve   _execve
 
#define ftruncate   _chsize
 
#define unlink   _unlink
 
#define fileno   _fileno
 
#define getcwd   _getcwd
 
#define chdir   _chdir
 
#define isatty   _isatty
 
#define lseek   _lseek
 
#define snprintf   _snprintf
 
#define strncasecmp   _strnicmp
 
#define strcasecmp   _stricmp
 
#define stat   _stat
 
#define ssize_t   long
 
#define STDIN_FILENO   0
 
#define STDOUT_FILENO   1
 
#define STDERR_FILENO   2
 

Typedefs

typedef __int8 int8_t
 
typedef __int16 int16_t
 
typedef __int32 int32_t
 
typedef __int64 int64_t
 
typedef unsigned __int8 uint8_t
 
typedef unsigned __int16 uint16_t
 
typedef unsigned __int32 uint32_t
 
typedef unsigned __int64 uint64_t
 

Functions

int usleep (unsigned usec)
 
int gettimeofday (struct timeval *tp, struct timezone *tzp)
 

Macro Definition Documentation

◆ __func__

#define __func__   __FUNCTION__

◆ access

#define access   _access

◆ chdir

#define chdir   _chdir

◆ dup2

#define dup2   _dup2

◆ execve

#define execve   _execve

◆ F_OK

#define F_OK   0 /* Test for existence. */

◆ fileno

#define fileno   _fileno

◆ ftruncate

#define ftruncate   _chsize

◆ getcwd

#define getcwd   _getcwd

◆ inline

#define inline   __inline

◆ isatty

#define isatty   _isatty

◆ lseek

#define lseek   _lseek

◆ R_OK

#define R_OK   4 /* Test for read permission. */

◆ random

#define random   rand

◆ snprintf

#define snprintf   _snprintf

◆ srandom

#define srandom   srand

◆ ssize_t

#define ssize_t   long

◆ stat

#define stat   _stat

◆ STDERR_FILENO

#define STDERR_FILENO   2

◆ STDIN_FILENO

#define STDIN_FILENO   0

◆ STDOUT_FILENO

#define STDOUT_FILENO   1

◆ strcasecmp

#define strcasecmp   _stricmp

◆ strncasecmp

#define strncasecmp   _strnicmp

◆ unlink

#define unlink   _unlink

◆ W_OK

#define W_OK   2 /* Test for write permission. */

Typedef Documentation

◆ int16_t

typedef __int16 int16_t

◆ int32_t

typedef __int32 int32_t

◆ int64_t

typedef __int64 int64_t

◆ int8_t

typedef __int8 int8_t

◆ uint16_t

typedef unsigned __int16 uint16_t

◆ uint32_t

typedef unsigned __int32 uint32_t

◆ uint64_t

typedef unsigned __int64 uint64_t

◆ uint8_t

typedef unsigned __int8 uint8_t

Function Documentation

◆ gettimeofday()

int gettimeofday ( struct timeval *  tp,
struct timezone *  tzp 
)
22{
23 // Note: some broken versions only have 8 trailing zero's, the correct epoch has 9 trailing zero's
24 // This magic number is the number of 100 nanosecond intervals since January 1, 1601 (UTC)
25 // until 00:00:00 January 1, 1970
26 static const std::uint64_t EPOCH = ((std::uint64_t) 116444736000000000ULL);
27
28 SYSTEMTIME system_time;
29 FILETIME file_time;
30 std::uint64_t time;
31
32 GetSystemTime(&system_time);
33 SystemTimeToFileTime(&system_time, &file_time);
34 time = ((std::uint64_t)file_time.dwLowDateTime);
35 time += ((std::uint64_t)file_time.dwHighDateTime) << 32;
36
37 tp->tv_sec = (long)((time - EPOCH) / 10000000L);
38 tp->tv_usec = (long)(system_time.wMilliseconds * 1000);
39 return 0;
40}
wchar_t const wchar_t unsigned long
Definition windows.hpp:29

References long.

Referenced by avr_write_byte_default(), igl::Timer::getElapsedTimeInMicroSec(), hid_read_timeout(), jtagmkII_recv_frame(), report_progress(), igl::Timer::start(), stk500v2_recv(), and igl::Timer::stop().

+ Here is the caller graph for this function:

◆ usleep()

int usleep ( unsigned  usec)
14{
15 std::this_thread::sleep_for(std::chrono::microseconds(usec));
16 return 0;
17}

Referenced by arduino_open(), avr910_chip_erase(), avr910_paged_write_eeprom(), avr910_paged_write_flash(), avr_write_byte_default(), avr_write_page(), avrdude_main(), bitbang_chip_erase(), bitbang_initialize(), buspirate_chip_erase(), buspirate_start_mode_bin(), butterfly_initialize(), butterfly_paged_write(), jtagmkII_smc_init32(), stk500_chip_erase(), stk500hv_chip_erase(), stk500isp_write_byte(), stk500v2_chip_erase(), stk500v2_initialize(), and wiring_open().

+ Here is the caller graph for this function: