MCPcopy Create free account
hub / github.com/VCVRack/Rack / getTime

Function getTime

src/system.cpp:765–781  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

763
764
765double getTime() {
766#if defined ARCH_WIN
767 LARGE_INTEGER counter;
768 QueryPerformanceCounter(&counter);
769 return (counter.QuadPart - startCounter) * counterTime;
770#elif defined ARCH_LIN
771 struct timespec ts;
772 clock_gettime(CLOCK_MONOTONIC_RAW, &ts);
773 int64_t time = int64_t(ts.tv_sec) * 1000000000LL + ts.tv_nsec;
774 return (time - startTime) / 1e9;
775#elif defined ARCH_MAC
776 int64_t counter = mach_absolute_time();
777 return (counter - startCounter) * counterTime;
778#else
779 return 0.0;
780#endif
781}
782
783
784double getUnixTime() {

Callers 12

saveMethod · 0.85
loadMethod · 0.85
runThreadMethod · 0.85
logVaFunction · 0.85
onMessageMethod · 0.85
stepMethod · 0.85
handleButtonMethod · 0.85
doProcessMethod · 0.85
stepBlockMethod · 0.85
Engine_fallbackRunFunction · 0.85
stepMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected