Thread overview | |||||
---|---|---|---|---|---|
|
December 13, 2020 MonoTimeImpl!(ClockType.normal) failed to get the frequency of the system's monotonic clock. | ||||
---|---|---|---|---|
| ||||
I have this D code base that when I compile to executable, it ran fine, but when I call the very same function from C, I get this error: Aborting from src/core/time.d(2113) MonoTimeImpl!(ClockType.normal) failed to get the frequency of the system's monotonic clock. from source code[1] I see ticksPerSecond failed to get a value but how don't know why and how can I fix that? can I track the line of code calling that function that end up with abort() call? my OS is openSUSE Leap 15.0, DMD64 D Compiler v2.094.2, DUB version 1.23.0, built on Nov 20 2020 [1]:https://github.com/dlang/druntime/blob/fd5f4e2dded204b01d977c695c3ff910a699bc52/src/core/time.d#2113 |
December 14, 2020 Re: MonoTimeImpl!(ClockType.normal) failed to get the frequency of the system's monotonic clock. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jack | Did you initialize the D runtime before you called the D code? (assuming C main). |
December 13, 2020 Re: MonoTimeImpl!(ClockType.normal) failed to get the frequency of the system's monotonic clock. | ||||
---|---|---|---|---|
| ||||
Posted in reply to rikki cattermole | On Sunday, 13 December 2020 at 17:34:26 UTC, rikki cattermole wrote:
> Did you initialize the D runtime before you called the D code? (assuming C main).
wow, thanks for such quck response. That's exactly what I missing in this function:
version(Posix)
{
import core.runtime : rt_init, rt_term;
rt_init();
scope(exit) rt_term();
}
thanks!
|
Copyright © 1999-2021 by the D Language Foundation