Simple timing

Paul via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Nov 17 08:24:08 PST 2014


I'm trying to write a program that involves simple timing; I like 
to be able to execute some function at a point no sooner than, 
say, 3500 milliseconds from now so I need to read the current 
'system time' in ticks and calculate the required point in the 
future using ticks per sec. In other languages I've done 
something like this (pseudo code).

now = currentTime;
target = now + 3500

do something
..
until currentTime > target
execute function


I'm completely new to D and find the help pages on this subject 
very confusing (or at least a bit too detailed for a beginner!). 
Can anyone point me to a simple example or tell me how to go 
about this?

Many thanks

Paul


More information about the Digitalmars-d-learn mailing list