digitalmars.D - Get millisecond difference between 2 times
- MrOverkill (26/26) Apr 05 2014 Dear sirs and madams and... Other things on internet forums,
- safety0ff (7/10) Apr 05 2014 You should look into:
- MrOverkill (2/13) Apr 05 2014 Thank you very much, good (sir/madam/other)
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?
Apr 05 2014
On Sunday, 6 April 2014 at 02:12:41 UTC, MrOverkill wrote: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.You should look into: and I'd likely use a StopWatch. Also, you should use D.learn for questions like this.
Apr 05 2014
On Sunday, 6 April 2014 at 02:31:29 UTC, safety0ff wrote:On Sunday, 6 April 2014 at 02:12:41 UTC, MrOverkill wrote:Thank you very much, good (sir/madam/other)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.You should look into: and I'd likely use a StopWatch. Also, you should use D.learn for questions like this.
Apr 05 2014