Exemplo n.º 1
0
tuint32 TimeManager::DiffTime_InSecond(tuint32 uDate1, tuint32 uDate2)
{
	tm kTime1, kTime2;
	ConvertUT(uDate1, &kTime1);
	ConvertUT(uDate2, &kTime2);

	time_t t1, t2;
	t1 = mktime(&kTime1);
	t2 = mktime(&kTime2);

	return (tuint32)(difftime(t2, t1));
}
Exemplo n.º 2
0
UINT TimeManager::DiffTime( UINT Date1, UINT Date2 )
{
__ENTER_FUNCTION

	tm S_D1, S_D2 ;
	ConvertUT( Date1, &S_D1 ) ;
	ConvertUT( Date2, &S_D2 ) ;
	time_t t1,t2 ;
	t1 = mktime(&S_D1) ;
	t2 = mktime(&S_D2) ;
	UINT dif = (UINT)(difftime(t2,t1)*1000) ;
	return dif ;

__LEAVE_FUNCTION

	return 0 ;
}