Module libuv::misc

source · []

Re-exports

pub use os::*;

Modules

Structs

Data type for CPU information.

Data type for resource usage results.

Data type for storing times.

Functions

Gets information about the CPUs on the system.

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().

Gets the amount of free memory available in the system, as reported by the kernel (in bytes).

Gets the title of the current process. You must call setup_args before calling this function on Unix and AIX systems. If setup_args has not been called on systems that require it, then ENOBUFS is returned.

Gets the total amount of physical memory in the system (in bytes).

Gets the resource usage measures for the current process.

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

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.

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

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

Sets the current process title. You must call setup_args before calling this function on Unix and AIX systems. If setup_args has not been called on systems that require it, then ENOBUFS is returned. 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.

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

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.

Causes the calling thread to sleep for msec milliseconds.

Gets the current system uptime.