I am writing a program to put time-stamps on images taken with a camera. To do that I am using the Windows 7 system time. I have used GetSystemTimeAsFileTime()
in the code below:
FILETIME ft;
GetSystemTimeAsFileTime(&ft);
long long ll_now = (LONGLONG)ft.dwLowDateTime + ((LONGLONG)(ft.dwHighDateTime) << 32LL);
What I want to do is to get the number of seconds gone in the day (0- 86400) with millisecond resolution so it will be something like 12345.678. Is this the right way to do it? If so, how to I convert this integer to get the number of seconds gone in the current day? I will be displaying the time in a string and using fstream
to put the times in a text file.
Thanks