version 1.11 | | version 1.12 |
---|
| | |
/* | | /* |
* static char *rcsid_time_c = | | * static char *rcsid_time_c = |
* "$Id: time.c,v 1.11 2002/07/15 04:25:39 mwedel Exp $"; | | * "$Id: time.c,v 1.12 2005/07/15 13:51:49 ryo_saeba Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
((tod.hour % 14 == 0) ? 14 : ((tod.hour)%14)), | | ((tod.hour % 14 == 0) ? 14 : ((tod.hour)%14)), |
((tod.hour >= 14) ? "pm" : "am"), | | ((tod.hour >= 14) ? "pm" : "am"), |
weekdays[tod.dayofweek]); | | weekdays[tod.dayofweek]); |
(*draw_info_func) (NDI_UNIQUE, 0,op,errmsg); | | new_draw_info(NDI_UNIQUE, 0,op,errmsg); |
| | |
day = tod.day + 1; | | day = tod.day + 1; |
if (day == 1 || ((day % 10) == 1 && day > 20)) | | if (day == 1 || ((day % 10) == 1 && day > 20)) |
| | |
suf = "th"; | | suf = "th"; |
sprintf(errmsg, "The %d%s Day of the %s, Year %d", day, suf, | | sprintf(errmsg, "The %d%s Day of the %s, Year %d", day, suf, |
month_name[tod.month], tod.year+1); | | month_name[tod.month], tod.year+1); |
(*draw_info_func) (NDI_UNIQUE, 0,op,errmsg); | | new_draw_info(NDI_UNIQUE, 0,op,errmsg); |
| | |
sprintf(errmsg, "Time of Year: %s", season_name[tod.season]); | | sprintf(errmsg, "Time of Year: %s", season_name[tod.season]); |
(*draw_info_func) (NDI_UNIQUE, 0,op,errmsg); | | new_draw_info(NDI_UNIQUE, 0,op,errmsg); |
} | | } |
| | |
void | | void |
| | |
if (!QUERY_FLAG(op,FLAG_WIZ)) | | if (!QUERY_FLAG(op,FLAG_WIZ)) |
return; | | return; |
| | |
(*draw_info_func) (NDI_UNIQUE, 0,op,"Total time:"); | | new_draw_info (NDI_UNIQUE, 0,op,"Total time:"); |
sprintf(errmsg,"ticks=%ld time=%ld.%2ld", | | sprintf(errmsg,"ticks=%ld time=%ld.%2ld", |
pticks, process_tot_mtime/1000, process_tot_mtime%1000); | | pticks, process_tot_mtime/1000, process_tot_mtime%1000); |
(*draw_info_func) (NDI_UNIQUE, 0,op,errmsg); | | new_draw_info (NDI_UNIQUE, 0,op,errmsg); |
sprintf(errmsg,"avg time=%ldms max time=%ldms min time=%ldms", | | sprintf(errmsg,"avg time=%ldms max time=%ldms min time=%ldms", |
process_tot_mtime/pticks, process_max_utime/1000, | | process_tot_mtime/pticks, process_max_utime/1000, |
process_min_utime/1000); | | process_min_utime/1000); |
(*draw_info_func) (NDI_UNIQUE, 0,op,errmsg); | | new_draw_info (NDI_UNIQUE, 0,op,errmsg); |
sprintf(errmsg,"ticks longer than max time (%ldms) = %ld (%ld%%)", | | sprintf(errmsg,"ticks longer than max time (%ldms) = %ld (%ld%%)", |
max_time/1000, | | max_time/1000, |
process_utime_long_count, 100*process_utime_long_count/pticks); | | process_utime_long_count, 100*process_utime_long_count/pticks); |
(*draw_info_func) (NDI_UNIQUE, 0,op,errmsg); | | new_draw_info (NDI_UNIQUE, 0,op,errmsg); |
| | |
sprintf(errmsg,"Time last %ld ticks:", pticks > PBUFLEN ? PBUFLEN : pticks); | | sprintf(errmsg,"Time last %ld ticks:", pticks > PBUFLEN ? PBUFLEN : pticks); |
(*draw_info_func) (NDI_UNIQUE, 0,op,errmsg); | | new_draw_info (NDI_UNIQUE, 0,op,errmsg); |
| | |
for (i = 0; i < (pticks > PBUFLEN ? PBUFLEN : pticks); i++) { | | for (i = 0; i < (pticks > PBUFLEN ? PBUFLEN : pticks); i++) { |
tot += process_utime_save[i]; | | tot += process_utime_save[i]; |
| | |
sprintf(errmsg,"avg time=%ldms max time=%dms min time=%dms", | | sprintf(errmsg,"avg time=%ldms max time=%dms min time=%dms", |
tot/(pticks > PBUFLEN ? PBUFLEN : pticks)/1000, maxt/1000, | | tot/(pticks > PBUFLEN ? PBUFLEN : pticks)/1000, maxt/1000, |
mint/1000); | | mint/1000); |
(*draw_info_func) (NDI_UNIQUE, 0,op,errmsg); | | new_draw_info (NDI_UNIQUE, 0,op,errmsg); |
sprintf(errmsg,"ticks longer than max time (%ldms) = %d (%ld%%)", | | sprintf(errmsg,"ticks longer than max time (%ldms) = %d (%ld%%)", |
max_time/1000, long_count, | | max_time/1000, long_count, |
100*long_count/(pticks > PBUFLEN ? PBUFLEN : pticks)); | | 100*long_count/(pticks > PBUFLEN ? PBUFLEN : pticks)); |
(*draw_info_func) (NDI_UNIQUE, 0,op,errmsg); | | new_draw_info (NDI_UNIQUE, 0,op,errmsg); |
} | | } |
| | |
long | | long |