MCPcopy Create free account
hub / github.com/BoevaLab/FREEC / duration

Method duration

src/ThreadPool.h:125–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123 pthread_t getThreadSelf() const {return tid;}
124
125 long long duration() const {
126 pthread_mutex_lock(&mp);
127 long long tv_usec = (state == FINISHED ? (unsigned long long)(tv_finished.tv_sec - tv_started.tv_sec) * 1000000 + (tv_finished.tv_usec - tv_started.tv_usec) : -1);
128 pthread_mutex_unlock(&mp);
129 return tv_usec;
130 }
131
132 ThreadArg* getArg() {return arg;}
133 bool deleteArg() const {return delete_arg;}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected