On 5/7/21 9:46 AM, Alain De Vos wrote:
I see,
https://dlang.org/phobos/core_stdc_time.html
does not contain the function : "clock_gettime"
Weird ...
stdc is about D bindings for C's std headers. I don't think
clock_gettime is a standard C function. grep'ping under /usr/include/dmd
reveals tha
I see,
https://dlang.org/phobos/core_stdc_time.html
does not contain the function : "clock_gettime"
Weird ...
Probably renamed ...
On 5/7/21 1:25 AM, Andre Pany wrote:
> get the cpu time
For the sake of completeness, that kind of functionality is provided by
operating systems as well. For example, on Linux, it is common to run
the program through 'time' to get how much wall clock advanced, how much
time was spent actuall
On Friday, 7 May 2021 at 08:58:33 UTC, Dennis wrote:
On Friday, 7 May 2021 at 08:52:13 UTC, Dennis wrote:
If you want to use it on Windows as well, this is a code
snippet I wrote for that:
For completeness, the imports it uses:
```D
version(Windows) {
import core.sys.windows.windows;
On Friday, 7 May 2021 at 08:52:13 UTC, Dennis wrote:
If you want to use it on Windows as well, this is a code
snippet I wrote for that:
For completeness, the imports it uses:
```D
version(Windows) {
import core.sys.windows.windows;
import core.sys.windows.psapi: PROCESS_MEMORY_COUNTERS
On Friday, 7 May 2021 at 08:25:43 UTC, Andre Pany wrote:
Is there some equivalent function in Phobos to get the cpu time
on linux?
I don't think so, but you can use `core.sys.posix.sys.resource:
rusage`.
If you want to use it on Windows as well, this is a code snippet
I wrote for that:
```
On Friday, 7 May 2021 at 08:37:47 UTC, Imperatorn wrote:
On Friday, 7 May 2021 at 08:25:43 UTC, Andre Pany wrote:
Hi,
I try to convert some python code to D. On python I can get
the cpu time for the current
process using
``` python
dcpu: float = time.process_time()
```
Is there some equival
On Friday, 7 May 2021 at 08:25:43 UTC, Andre Pany wrote:
Hi,
I try to convert some python code to D. On python I can get the
cpu time for the current
process using
``` python
dcpu: float = time.process_time()
```
Is there some equivalent function in Phobos to get the cpu time
on linux?
Ki
Hi,
I try to convert some python code to D. On python I can get the
cpu time for the current
process using
``` python
dcpu: float = time.process_time()
```
Is there some equivalent function in Phobos to get the cpu time
on linux?
Kind regards
André
10 matches
Mail list logo