[][src]Module libuv::misc

Re-exports

pub use os::*;

Modules

os

Structs

CpuInfo

Data type for CPU information.

ResourceUsage

Data type for resource usage results.

TimeVal

Data type for storing times.

Functions

cpu_info

Gets information about the CPUs on the system.

get_constrained_memory

Gets the amount of memory available to the process (in bytes) based on limits imposed by the OS. If there is no such constraint, or the constraint is unknown, 0 is returned. Note that it is not unusual for this value to be less than or greater than uv_get_total_memory().

get_free_memory

Gets memory information (in bytes).

get_process_title

Gets the title of the current process. You must call setup_args before calling this function.

get_total_memory

Gets memory information (in bytes).

getrusage

Gets the resource usage measures for the current process.

gettimeofday

Cross-platform implementation of gettimeofday(2). The timezone argument to gettimeofday() is not supported, as it is considered obsolete.

hrtime

Returns the current high-resolution real time. This is expressed in nanoseconds. It is relative to an arbitrary time in the past. It is not related to the time of day and therefore not subject to clock drift. The primary use is for measuring performance between intervals.

loadavg

Gets the load average. See: https://en.wikipedia.org/wiki/Load_(computing)

resident_set_memory

Gets the resident set size (RSS) for the current process.

set_process_title

Sets the current process title. You must call uv_setup_args before calling this function. On platforms with a fixed size buffer for the process title the contents of title will be copied to the buffer and truncated if larger than the available space. Other platforms will return ENOMEM if they cannot allocate enough space to duplicate the contents of title.

setup_args

Store the program arguments. Required for getting / setting the process title. Libuv may take ownership of the memory that argv points to. This function should be called exactly once, at program start-up.

shutdown

Release any global state that libuv is holding onto. Libuv will normally do so automatically when it is unloaded but it can be instructed to perform cleanup manually.

sleep

Causes the calling thread to sleep for msec milliseconds.

uptime

Gets the current system uptime.