Changeset 94107fa8 in rtems
- Timestamp:
- 10/02/11 08:15:02 (11 years ago)
- Branches:
- 4.11, 5, master
- Children:
- ff09991
- Parents:
- 75e454c0
- Location:
- cpukit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/ChangeLog
r75e454c0 r94107fa8 1 2011-10-02 Ralf Corsépius <ralf.corsepius@rtems.org> 2 3 * libmisc/shell/main_time.c: Introduce PRIdtime_t. 4 1 5 2011-10-02 Ralf Corsépius <ralf.corsepius@rtems.org> 2 6 -
cpukit/libmisc/shell/main_time.c
r75e454c0 r94107fa8 18 18 #include <unistd.h> 19 19 #include <string.h> 20 #include <inttypes.h> 20 21 #include <errno.h> 21 22 #include <sys/types.h> … … 25 26 #include <rtems/shell.h> 26 27 #include "internal.h" 28 29 /* Helper macro to print "time_t" */ 30 #if SIZEOF_TIME_T == 8 31 #define PRIdtime_t PRId64 32 #elif SIZEOF_TIME_T == 4 33 #define PRIdtime_t PRId32 34 #else 35 #error "PRIdtime_t: unsupported size of time_t" 36 #endif 27 37 28 38 int rtems_shell_main_time( … … 67 77 } 68 78 69 printf("time: % li:%02li:%02li.%03li\n",79 printf("time: %" PRIdtime_t ":%02" PRIdtime_t ":%02" PRIdtime_t ".%03li\n", 70 80 period.tv_sec / 3600, 71 81 period.tv_sec / 60, period.tv_sec % 60,
Note: See TracChangeset
for help on using the changeset viewer.