MonoTime equivalent of `TickDuration.currSystemTick.msecs` ?
Salih Dincer
salihdb at hotmail.com
Wed Dec 11 04:33:58 UTC 2024
On Wednesday, 11 December 2024 at 03:40:35 UTC, user1234 wrote:
> what's the `MonoTime` equivalent of the now deprecated
> `TickDuration.currSystemTick.msecs` ?
```d
import core.time;
// Get the current monotonic time
auto currentTime = MonoTime.currTime;
// Convert the MonoTime to milliseconds
long milliseconds = (currentTime - MonoTime.zero).total!"msecs";
```
Generated with AI
More information about the Digitalmars-d-learn
mailing list