K2InformaticsGmbH / imem

Clustered in-memory database based on MNESIA with simple SQL layer
http://www.k2informatics.ch/
Apache License 2.0
21 stars 4 forks source link

009052 imem clock API using QueryPerformanceFrequency NIF #264

Closed c-bik closed 5 years ago

c-bik commented 5 years ago

Ref: https://docs.microsoft.com/en-us/windows/win32/api/profileapi/nf-profileapi-queryperformancefrequency

stoch commented 5 years ago

@c-bik Please consider providing two additional API functions to directly get clock_counters for calibrated ms and usec clocks by doing the calibration internally. For a quick win, to be first implemented in Erlang and maybe later in C if the overhead can be reduced significantly. Consider a call frequency of 10'000/sec in the router app when deciding to go through the hassle of doing long integer math in C.