473,398 Members | 2,343 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,398 software developers and data experts.

C++ Time Acquisition Problem

1
Hi guys..

I'm a newbie in C++.

I need to extract the number of seconds between the current time, say SYSTEMTIME, and Jan. 1, 2000 00:00:00...


I used the following code:

--------------------------------------------------------------------------------------------------------------
Expand|Select|Wrap|Line Numbers
  1. FILETIME ft;
  2. SYSTEMTIME st;
  3. time_t tt = time(01/01/2000);
  4. double timeSpan
  5.  
  6. GetSystemTime(&st);              // gets current time
  7. SystemTimeToFileTime(&st, &ft); 
  8. long currTime = ft.dwHighDateTime << 24 | ft.dwLowDateTime;
  9.  
  10. timeSpan = difftime(currTime, tt);
  11.  
-------------------------------------------------------------------------------------------------------------


Your help would be greatly appreciated....
Oct 22 '07 #1
1 1141
sicarie
4,677 Expert Mod 4TB
And did that not work for you? I'm sorry, I don't understand your question...
Nov 1 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Soefara | last post by:
What I'd like to have a request to, say, http://www.mydomain.com/Aaaa/Bbbb/Cccc be handled by http://www.mydomain.com/Aaaa/index.php but with the "Bbbb" and "Cccc" stored in a request variable...
0
by: Steve Terepin | last post by:
I'm writing an app that does real time data acquisition, and needs to respond to DMA-complete events that get signalled every 10mS approximately. Currently I have some native C++ code that works...
2
by: Johann Blake | last post by:
If you are, I'd be interested in knowing what kinds of applications you are working on and the problems, if any, you are confronting. Best Regards, Johann Blake CloserWorlds Mobile Solutions...
1
by: Ryan Melville | last post by:
Hi, I need to use WIA (Windows Image Acquisition) from managed C++. Is there a "new and improved" way to access WIA from managed C++ (i.e., through .net)? Or, is it the same COM calls as from...
7
by: jude | last post by:
Hello, We are starting to discuss a new ASP.NET application that will be a data acquisition display application. The data to be displayed will come from multiple sources--database tables, serial...
3
by: Roberto Hernández | last post by:
I try to use the Windows Image Acquisition (WIA) with a sample in vb.net but it takes only back photos and also at low resolution. How can I put ther resolution at 640x480? I have a Labtec webcam...
3
by: sellone | last post by:
Hi everyone. I just begun programming with visual basic (6.0) and I need to develop an application for monitoring the results on an acquisition system. So I need to output a graph to the screen that...
3
by: timhoagland | last post by:
Hi, I have a C++ data acquisition program, running under Linux. The basic stucture is: Setup devices Acquire data for x seconds. Cleanup. The problem is that I don't have a way to...
36
by: Ulysses | last post by:
Could someone tell me how to go about getting data from a data acquisition card using C?...<Just general information would also help........I'm just working on an idea at the moment>.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.