changed a sample code for time

This commit is contained in:
hyung-hwan 2011-08-13 23:05:03 +00:00
parent 8923102323
commit ce8e12cb46

View File

@ -78,6 +78,7 @@ static int test1 (void)
#endif #endif
qse_ntime_t qnt = nt * 1000; qse_ntime_t qnt = nt * 1000;
struct tm* tm; struct tm* tm;
qse_ntime_t xx;
if (qnt >= 0) qnt += rand() % 1000; if (qnt >= 0) qnt += rand() % 1000;
else qnt -= rand() % 1000; else qnt -= rand() % 1000;
@ -115,8 +116,8 @@ static int test1 (void)
} }
else else
{ {
qse_ntime_t xx;
qse_printf (QSE_T("[GMTIME OK]")); qse_printf (QSE_T("[GMTIME OK]"));
}
if (qse_timegm (&bt, &xx) == -1) if (qse_timegm (&bt, &xx) == -1)
{ {
@ -139,8 +140,6 @@ static int test1 (void)
} }
} }
}
return 0; return 0;
} }