MCPcopy Create free account
hub / github.com/RenderKit/embree / get_clock

Function get_clock

tutorials/forest/forest.cpp:46–56  ·  view source on GitHub ↗

* a very simple time stamp with microsecond resolution that can also be * used from the ISPC side */

Source from the content-addressed store, hash-verified

44 * used from the ISPC side
45 */
46 int64_t get_clock()
47 {
48#if defined(__MACOSX__)
49 // oh apple
50 return 0;
51#else
52 struct timespec now;
53 timespec_get(&now, TIME_UTC);
54 return ((int64_t) now.tv_sec) * 1000000 + ((int64_t) now.tv_nsec) / 1000;
55#endif
56 }
57
58 /*
59 * returns the elapsed time in full milliseconds for a time stamp delta has

Callers 1

device_renderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected