MCPcopy Create free account
hub / github.com/awslabs/aws-lambda-cpp / ReadProcFileField

Function ReadProcFileField

tests/gtest/gtest-all.cc:9808–9817  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9806namespace {
9807template <typename T>
9808T ReadProcFileField(const std::string& filename, int field) {
9809 std::string dummy;
9810 std::ifstream file(filename.c_str());
9811 while (field-- > 0) {
9812 file >> dummy;
9813 }
9814 T output = 0;
9815 file >> output;
9816 return output;
9817}
9818} // namespace
9819
9820// Returns the number of active threads, or 0 when there is an error.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected