print_time.c
来自「seed格式数据解压程序,地震分析人员必备」· C语言 代码 · 共 51 行
C
51 行
/*===========================================================================*//* DMC Interim | print_time | utility *//*===========================================================================*//* Name: print_time Purpose: print a time in struct input_time fmt with an identifying string Usage: void print_time (); char *string; struct input_time *time; print_time (string, time); Input: string = ptr to string to preface output time string time = ptr to original time in struct input_time form Output: none Externals: none Warnings: none Errors: none Called by: anything Calls to: none Algorithm: print out string and time to stream connected to D_OUT Notes: The time structure looks like: struct input_time { unsigned short int year; unsigned short int day; char hour; char minute; char second; unsigned short int fracsec; }; Problems: Debug: level D_MIN - level D_MED - level D_MAX - References: none Language: ANSI standard C Author: Kevin MacKenzie 01 mar 1989 Revisions: */#include "output.h"void print_time (string, time)char *string;struct input_time *time;{ fprintf (D_OUT, "%s\t%d\t%03d\t%02d:%02d:%02d.%04d\n", string, time->year, time->day, time->hour, time->minute, time->second, time->fracsec); return;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?