October 24, 2022 [Issue 15466] Incorrect result for 'real' | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=15466 RazvanN <razvan.nitu1305@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |razvan.nitu1305@gmail.com Resolution|--- |WORKSFORME --- Comment #1 from RazvanN <razvan.nitu1305@gmail.com> --- Hi, Ali! I was not able to compile your initial code in the bug report, so I slightly modified it to compile: ```d import std.stdio; import std.datetime.stopwatch; // this was `import std.datetime;` alias T = real; // Must be 'real' enum testCount = 7; // Must be > 6 T foo() { // Must return a value return 42; } void main() { // Must cast to void const m = benchmark!(() => cast(void)foo)(testCount); writeln(m[0].total!"msecs"); // this was `writeln(m[0].msecs);` } ``` Running this code yields `0`. I will close this as WORKSFORME, but please reopen if there is anything that I am missing. -- | ||||
October 24, 2022 [Issue 15466] Incorrect result for 'real' | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=15466 --- Comment #2 from Ali Cehreli <acehreli@yahoo.com> --- Thanks! Works for me as well. -- | ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply