将两个时间间隔以毫秒的形式来表示

下面是MSDN的提示:  
  Remarks  
  It   is   not   recommended   that   you   add   and   subtract   values   from   the   SYSTEMTIME   structure   to   obtain   relative   times.   Instead,   you   should    
   
  1、Convert   the   SYSTEMTIME   structure   to   a   FILETIME   structure.    
  2、Copy   the   resulting   FILETIME   structure   to   a   LARGE_INTEGER   structure.    
  3、Use   normal   64-bit   arithmetic   on   the   LARGE_INTEGER   value.    
   
  所以可以这样做:  
  FILETIME   ftStart,   ftEnd;  
  SystemTimeToFileTime(&m_stStart,   &ftStart);  
  SystemTimeToFileTime(&m_stEnd,   &ftEnd);  
   
  LARGE_INTEGER   liStart,   liEnd;  
  liStart.HighPart   =   ftStart.dwHighDateTime;  
  liStart.LowPart   =   ftStart.dwLowDateTime;  
  liEnd.HighPart   =   ftEnd.dwHighDateTime;  
  liEnd.LowPart   =   ftEnd.dwLowDateTime;  
   
  __int64   llUsedTime   =   (liEnd.QuadPart   -   liStart.QuadPart)/10000;   //you   want   time
原文地址:https://www.cnblogs.com/strinkbug/p/778369.html