Nix
2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Toggle main menu visibility
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
14
namespace
nix {
15
19
std::chrono::microseconds
getCpuUserTime
();
20
25
unsigned
int
getMaxCPU();
26
27
// It does not seem possible to dynamically change stack size on Windows.
28
#ifndef _WIN32
37
void
ensureStackSizeAtLeast
(
size_t
stackSize);
38
#endif
39
46
void
restoreProcessContext(
bool
restoreMounts =
true
);
47
51
std::optional<std::filesystem::path> getSelfExe();
52
53
}
// namespace nix
nix::getCpuUserTime
std::chrono::microseconds getCpuUserTime()
Definition
current-process.cc:15
nix::ensureStackSizeAtLeast
void ensureStackSizeAtLeast(size_t stackSize)
Definition
current-process.cc:31
types.hh
libutil
include
nix
util
current-process.hh
Generated by
1.18.0