x++; pc.printf("\n\r"); pc.printf("%d A fclosed! %d \n\r",alt, x); //B ++++++++++++++++++++ FILE *fpB = fopen("/local/pgx_04LB.txt", "w"); // Open " pgx_04LB.txt " on the local file system for writing for(int ii=0; ii<1000; ii++){ int ii_t = 1+ii%100; seconds = time(NULL); //タイムスタンプ取得 fprintf(fpB, "%d Hello %d B World! - Event %d --- mbed application / Date %s # \r\n",alt, 1+ii, ii_t, ctime(&seconds)); x++; } fclose(fpB); //ファイルB閉鎖 x++; pc.printf("\n\r"); pc.printf("%d B fclosed! %d \n\r",alt, x); } // while END seconds = time(NULL); struct tm *tx = localtime(&seconds); pc.printf("year %d/mon %d/day %d/hour %d/min %d/sec %d \n\r", tx->tm_year,tx->tm_mon,tx->tm_mday,tx->tm_hour,tx->tm_min,tx->tm_sec ); pc.printf("Time as a string = %s \n\r", ctime(&seconds)); } //プログラムEOF