Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting System Time in Windows 32

Status
Not open for further replies.

MadWombat

Programmer
Feb 3, 2001
4
CA
Hi all,

I'm new to programming under windows, but have some experience under UNIX. I'm trying to get the system time from the computer to the most precise degree possible (well, microseconds are close enough). Under UNIX, I would use the gettimeofday function in the time library. However, I am unable to do so in Visual C++, presumably because there is no such function defined.

Does anyone have any ideas as to how I can get the time in this environment?

Thanks muchly,

Paul
 
> I'm trying to get the system time

GetSystemTime()

-pete
 
Ok, I found what I needed. It was the GetSystemTimeAsFileTime function so that I can get the difference in times between two events.

Thanks!

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top