Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
current-process.hh
Go to the documentation of this file.
1#pragma once
3
4#include <filesystem>
5#include <optional>
6#include <chrono>
7
8#ifndef _WIN32
9# include <sys/resource.h>
10#endif
11
12#include "nix/util/types.hh"
13
14namespace nix {
15
19std::chrono::microseconds getCpuUserTime();
20
25unsigned int getMaxCPU();
26
27// It does not seem possible to dynamically change stack size on Windows.
28#ifndef _WIN32
37void ensureStackSizeAtLeast(size_t stackSize);
38#endif
39
46void restoreProcessContext(bool restoreMounts = true);
47
51std::optional<std::filesystem::path> getSelfExe();
52
53} // namespace nix
std::chrono::microseconds getCpuUserTime()
Definition current-process.cc:15
void ensureStackSizeAtLeast(size_t stackSize)
Definition current-process.cc:31