How to obtain real time?
I want to do with real time and computer time, determine the computer time is correct
CodePudding user response:
Search the NTP SNTP, network timing protocolCodePudding user response:
Also, use CTime: : GetCurrentTime (), a % X minutes, when you will get what can separate for hours, minutes and secondsCodePudding user response:
https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-6.0/aa315344 (60) v=vs.Extraction
TABLE 2
GetTime Returns a time_t that corresponds to this CTime object.
GetYear Returns the year that this CTime object represents.
GetMonth Returns the month that this CTime object represents (1 through 12).
GetDay Returns of the day that this CTime object represents (1 through 31).
GetHour Returns the hour that this CTime object represents (0 through 23).
GetMinute Returns the minute that this CTime object represents (0 through 59).
GetSecond Returns the second that this CTime object represents (0 through 59).
GetDayOfWeek Returns the day of the week (1 for Sunday, 2 for Monday, and so forth).
CodePudding user response:
So, thank the bossesCodePudding user response:
Every time you can take time before the synchronizationCall w32tm/resync command Windows's own time synchronization