473,387 Members | 1,569 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Get time difference

Hiya

Does anyone know how I would get the difference between 2 times in
milliseconds? I am doing functions that may take less than a second, and I
need to know how many milliseconds it took. Also, for the function that did
take over a second, I need to format the time to take into account the
milliseconds as well. For example: Function 1 = 0.5 Secs, Function 2 = 3.7
Secs (The time is taken before and after the function call and I will
calculate the time based on these 2 times)

Thank you.

Regards,
Steve.
Nov 22 '05 #1
2 1631
If you're looking for high performance timers, there is one included in the
sample on the following page :
http://msdn.microsoft.com/library/de...rp11152001.asp

Yves

"Sauron" <st****@centurion-ms.co.uk> schreef in bericht
news:O8**************@TK2MSFTNGP12.phx.gbl...
Hiya

Does anyone know how I would get the difference between 2 times in
milliseconds? I am doing functions that may take less than a second, and I
need to know how many milliseconds it took. Also, for the function that did take over a second, I need to format the time to take into account the
milliseconds as well. For example: Function 1 = 0.5 Secs, Function 2 = 3.7
Secs (The time is taken before and after the function call and I will
calculate the time based on these 2 times)

Thank you.

Regards,
Steve.

Nov 22 '05 #2
Hi Phoenix

Works a treat! Thank you :o)

Regards,
Steve

"phoenix" <pa******@skynetWORK.be> wrote in message
news:OJ**************@TK2MSFTNGP10.phx.gbl...
If you're looking for high performance timers, there is one included in the sample on the following page :
http://msdn.microsoft.com/library/de...rp11152001.asp
Yves

"Sauron" <st****@centurion-ms.co.uk> schreef in bericht
news:O8**************@TK2MSFTNGP12.phx.gbl...
Hiya

Does anyone know how I would get the difference between 2 times in
milliseconds? I am doing functions that may take less than a second, and I need to know how many milliseconds it took. Also, for the function that

did
take over a second, I need to format the time to take into account the
milliseconds as well. For example: Function 1 = 0.5 Secs, Function 2 = 3.7 Secs (The time is taken before and after the function call and I will
calculate the time based on these 2 times)

Thank you.

Regards,
Steve.


Nov 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jason Reljac | last post by:
Howdy, For a project I am working on right now I need to be able to calculate the time difference between to given times. (For example...The difference between 11:30 am and 1:45pm being 2:15) ...
10
by: Andreas | last post by:
Hi! Is it possible to get a time event at a specific time, for instance eight a'clock? My program is running in the background and is minimized to the tray bar. If not, is there a smooth way...
2
by: Joe User | last post by:
I am looking to calculate the difference between and event time and a sample time of Now. This is the query that I thought would do it, however I'm returning DIFFERENCE values that look the same...
6
by: cournape | last post by:
Hi there, I have some scientific application written in python. There is a good deal of list processing, but also some "simple" computation such as basic linear algebra involved. I would like to...
6
by: Michael Bulatovich | last post by:
I have a very simple db I use for keeping track of hours, tasks, projects, clients etc. It has a form that I use to enter data. Currently the form has a textbox for a field called "start time",...
7
by: Edward Mitchell | last post by:
I have a number of DateTimePicker controls, some set to dates, some set to a format of Time. The controls are all embedded in dialogs. I created the controls by dragging the DateTime picker from...
5
by: Geoff Jones | last post by:
Hi I have question regarding times and dates in a datatable. I have one table with one column having the date e.g.03/09/04, and another column other the time 08:03:05. The other table has one...
3
by: Randall Parker | last post by:
Suppose one has a database of UTC times that are from different dates in the past. The problem with translating those times to a local time is that one does not know for each UTC time whether the...
3
by: Steve | last post by:
I am trying to calculate elapsed travel times for flights. My plan is to enter the local departure time, the departure city and the local arrival time and city. These times would be standardised...
15
by: student4lifer | last post by:
Hello, I have 2 time fields dynamically generated in format "m/d/y H:m". Could someone show me a good function to calculate the time interval difference in minutes? I played with strtotime() but...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.