MCPcopy Create free account
hub / github.com/async-profiler/async-profiler / processStartTime

Method processStartTime

src/os_macos.cpp:137–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137u64 OS::processStartTime() {
138 static u64 start_time = 0;
139
140 if (start_time == 0) {
141 struct proc_bsdinfo info;
142 if (proc_pidinfo(processId(), PROC_PIDTBSDINFO, 0, &info, sizeof(info)) > 0) {
143 start_time = (u64)info.pbi_start_tvsec * 1000 + info.pbi_start_tvusec / 1000;
144 }
145 }
146
147 return start_time;
148}
149
150u64 OS::hton64(u64 x) {
151 return OSSwapHostToBigInt64(x);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected