#include <stdio.h> |
#include <io.h> |
int main( void ) |
{ |
FILE *stream; |
struct ftime ft; |
if ((stream = fopen ( "TEST.$$$" , |
"wt" )) == NULL) |
{ |
fprintf (stderr, |
"Cannot open output file.\n" ); |
return 1; |
} |
getftime(fileno(stream), &ft); |
printf ( "File time: %u:%u:%u\n" , |
ft.ft_hour, ft.ft_min, |
ft.ft_tsec * 2); |
printf ( "File date: %u/%u/%u\n" , |
ft.ft_month, ft.ft_day, |
ft.ft_year+1980); |
fclose (stream); |
return 0; |
} |