char *pstr_errptn = NULL;
char *pstr_module = NULL;
char *pstr_arch = NULL;
+ char str_time[64];
DWord dw_tmp;
DWord dw_errlv1;
DWord dw_errlv2;
DWord dw_srcid;
DWord dw_funcid;
+ struct tm t_tm;
Drd64_ErrorInfo *p_errinfo;
if( 0x00 == p_errinfo->dw_error ) { return 0x00; }
- printf("[ErrorInfo] %2d ------------------------------------------------------------------\n", i_id );
+ localtime_r( (const time_t *)&(p_errinfo->t_time.tv_sec), &t_tm );
+ strftime( str_time, 64, "%Y/%m/%d(%a) %T", &t_tm );
+
+ printf("[ErrorInfo] %2d --------------------------------- %s.%03lu.%03lu\n",
+ i_id, str_time, (p_errinfo->t_time.tv_usec / 1000), (p_errinfo->t_time.tv_usec % 1000) );
printf(" ErrCode : %08x h\n", p_errinfo->dw_error );
dw_tmp = DRD64_ERROR_TYPE( p_errinfo->dw_error );
p_errinfo->i_srcline = i_srcline;
p_errinfo->qw_value[0] = qw_value1;
p_errinfo->qw_value[1] = qw_value2;
+ gettimeofday( &(p_errinfo->t_time), NULL );
return 0x00;
}
/*----------------------------------------------------------------------
----------------------------------------------------------------------*/
+LIBBROWNIE_FUNC
+void
+ LibBrownie_Error_ClearErrorInfo(
+ void )
+{
+ if( NULL != gp_errorinfo )
+ { memset( gp_errorinfo, 0x00, sizeof( Drd64_ErrorInfo ) * gi_max_errorinfo ); }
+
+ return;
+}
+
+
+/*----------------------------------------------------------------------
+----------------------------------------------------------------------*/
LIBBROWNIE_ERROR_EXTERN
int
LibBrownie_Error_InitErrorSystem(