Get millisecond difference between 2 times
MrOverkill
stingerbarb at gmail.com
Sat Apr 5 19:12:39 PDT 2014
Dear sirs and madams and... Other things on internet forums,
I am attempting to write a program, and I was wondering how to
get the time difference between point a and point b. For example
long a, b;
int thingy;
this()
{
a = 0; // Or whatever function should be used to set an initial
value
b = 0; // Same as a
thingy = 0;
}
void run()
{
// Do intensive calculations...
b = System.currentTimeMillis(); // Only ever done this in Java
:P
thingy++;
if((b-a) >= 500)
{
b = a;
// Do something with thingy...
}
}
Any idea how this might work with actual code instead of fake
code?
More information about the Digitalmars-d
mailing list