www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - MonoTime equivalent of `TickDuration.currSystemTick.msecs` ?

reply user1234 <user1234 12.de> writes:
what's the `MonoTime` equivalent of the now deprecated 
`TickDuration.currSystemTick.msecs` ?
Dec 10 2024
parent reply Salih Dincer <salihdb hotmail.com> writes:
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
Dec 10 2024
parent user1234 <user1234 12.de> writes:
On Wednesday, 11 December 2024 at 04:33:58 UTC, Salih Dincer 
wrote:
 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
I can't thank you then ;)
Dec 10 2024