[help]how to get the microsecond-precision in windows?

Reply

Join Date: Oct 2008
Posts: 4
Reputation: walsug is an unknown quantity at this point 
Solved Threads: 0
walsug walsug is offline Offline
Newbie Poster

[help]how to get the microsecond-precision in windows?

 
0
  #1
Dec 11th, 2008
hello,
the windows API GetSystemTime() could return the current time by a SYSTEMTIME struct variable,then the windows API SystemTimeToFileTime could change this struct into the form of 100-nanoseconds that ever passed since since January 1, 1601 (UTC),this number is stored in a FILETIME struct which has a high part and a low part.
but now I wanna get the current seconds(like the time() in time.h) and the microseconds that within one second(this is the point),
How can I convert the 100-nanoseconds value to what I want?
Or is there annother effective way to do this?
thanks.
-yogo
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 30
Reputation: kirill1996 is an unknown quantity at this point 
Solved Threads: 1
kirill1996 kirill1996 is offline Offline
Light Poster

Re: [help]how to get the microsecond-precision in windows?

 
0
  #2
Dec 11th, 2008
Wait im redading youre post
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 3,204
Reputation: gerbil will become famous soon enough gerbil will become famous soon enough 
Solved Threads: 188
gerbil gerbil is offline Offline
Nearly a Senior Poster

Re: [help]how to get the microsecond-precision in windows?

 
0
  #3
Dec 12th, 2008
Are you hoping to use Windows as an accurate clock [absolute time] or as a stopwatch [relative time]?
Deep, deep in the woods, but walking about.
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 5,850
Reputation: Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute 
Solved Threads: 751
Team Colleague
Salem's Avatar
Salem Salem is offline Offline
Void main'ers are DOOMed

Re: [help]how to get the microsecond-precision in windows?

 
0
  #4
Dec 12th, 2008
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 4
Reputation: walsug is an unknown quantity at this point 
Solved Threads: 0
walsug walsug is offline Offline
Newbie Poster

Re: [help]how to get the microsecond-precision in windows?

 
0
  #5
Dec 15th, 2008
Originally Posted by gerbil View Post
Are you hoping to use Windows as an accurate clock [absolute time] or as a stopwatch [relative time]?
hi,
accurate clock [absolute time],I think,as I've posted.

regards
-yogo
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Windows NT / 2000 / XP Forum


Views: 538 | Replies: 4
Thread Tools Search this Thread



Tag cloud for Windows NT / 2000 / XP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC