Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
porting.h File Reference
#include <string>
#include "config.h"
#include "irrlichttypes.h"
#include "debug.h"
#include "constants.h"
#include "util/timetaker.h"
#include <unistd.h>
#include <cstdlib>
#include <sys/time.h>
#include <ctime>
+ Include dependency graph for porting.h:

Go to the source code of this file.

Namespaces

namespace  porting
 

Macros

#define SWPRINTF_CHARSTRING   L"%s"
 
#define sleep_ms(x)   usleep((x)*1000)
 
#define sleep_us(x)   usleep(x)
 
#define strlcpy(d, s, n)   mystrlcpy(d, s, n)
 

Functions

void porting::signal_handler_init (void)
 
bool * porting::signal_handler_killstatus ()
 
bool porting::getCurrentExecPath (char *buf, size_t len)
 
std::string porting::getDataPath (const char *subpath)
 
void porting::initializePaths ()
 
const std::string & porting::get_sysinfo ()
 
void porting::os_get_clock (struct timespec *ts)
 
u64 porting::getTimeS ()
 
u64 porting::getTimeMs ()
 
u64 porting::getTimeUs ()
 
u64 porting::getTimeNs ()
 
u64 porting::getTime (TimePrecision prec)
 
u64 porting::getDeltaMs (u64 old_time_ms, u64 new_time_ms)
 Delta calculation function arguments.
 
const char * porting::getPlatformName ()
 
bool porting::secure_rand_fill_buf (void *buf, size_t len)
 
void porting::osSpecificInit ()
 
void porting::attachOrCreateConsole ()
 
static void porting::TrackFreedMemory (size_t amount)
 
static void porting::TriggerMemoryTrim ()
 
int porting::mt_snprintf (char *buf, const size_t buf_size, const char *fmt,...)
 
bool porting::open_url (const std::string &url)
 Opens URL in default web browser.
 
bool porting::open_directory (const std::string &path)
 Opens a directory in the default file manager.
 

Macro Definition Documentation

◆ sleep_ms

◆ sleep_us

#define sleep_us ( x)    usleep(x)

Referenced by FpsControl::limit().

◆ strlcpy

#define strlcpy ( d,
s,
n )   mystrlcpy(d, s, n)

Referenced by read_flags_table().

◆ SWPRINTF_CHARSTRING

#define SWPRINTF_CHARSTRING   L"%s"