#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_ACCURACY_US 200 |
| #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. | |
| void | porting::preciseSleepUs (u64 sleep_time) |
| 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. | |
| #define SLEEP_ACCURACY_US 200 |
Referenced by porting::preciseSleepUs().
Referenced by dedicated_server_loop(), MeshUpdateWorkerThread::doUpdate(), httpfetch_sync_interruptible(), ClientLauncher::main_menu(), SimpleTestThread::run(), TLSTestThread::run(), fs::safeWriteToFile(), Game::shutdown(), Thread::start(), TestConnection::testConnectSendReceive(), TestSocket::testIPv4Socket(), TestSocket::testIPv6Socket(), TestThreading::testStartStopWait(), CurlFetchThread::waitForIO(), and Server::yieldToOtherThreads().
Referenced by porting::preciseSleepUs().
| #define strlcpy | ( | d, | |
| s, | |||
| n ) mystrlcpy(d, s, n) |
Referenced by read_flags_table().
| #define SWPRINTF_CHARSTRING L"%s" |