MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / GetPerformanceCounter

Function GetPerformanceCounter

src/commons/random.cpp:26–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24#include <openssl/rand.h>
25
26static inline int64_t GetPerformanceCounter()
27{
28 int64_t nCounter = 0;
29#ifdef WIN32
30 QueryPerformanceCounter((LARGE_INTEGER*)&nCounter);
31#else
32 timeval t;
33 gettimeofday(&t, NULL);
34 nCounter = (int64_t)(t.tv_sec * 1000000 + t.tv_usec);
35#endif
36 return nCounter;
37}
38
39void RandAddSeed()
40{

Callers 1

RandAddSeedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected