MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / stopTime

Function stopTime

xs/sources/xsMemory.c:122–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122void stopTime(txSample* theSample)
123{
124 struct timespec time;
125 clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &time);
126 theSample->duration += ((double)(time.tv_sec) - (double)(theSample->time.tv_sec))
127 + (((double)(time.tv_nsec) - (double)(theSample->time.tv_nsec)) / 1000000000.0);
128 theSample->count++;
129}
130
131txSample gxLifeTime = { { 0, 0 }, 0, 0, "life" };
132txSample gxMarkTime = { { 0, 0 }, 0, 0, "mark" };

Callers 3

fxCollectFunction · 0.85
fxFreeFunction · 0.85
fxSweepFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected