Changeset 340 for asp3_tinet_ecnl_rx/trunk/ntshell/ntshell/usrcmd.c
- Timestamp:
- Apr 13, 2018, 1:00:30 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
asp3_tinet_ecnl_rx/trunk/ntshell/ntshell/usrcmd.c
r337 r340 790 790 } 791 791 792 int usrcmd_date(int argc, char **argv) 793 { 794 int ret; 795 struct timespec tp; 796 char buf[30]; 797 798 ret = shell_clock_gettime(CLOCK_REALTIME, &tp); 799 if (ret != 0) { 800 ntstdio_printf(&ntstdio, "clock_gettime error %d", ret); 801 return 0; 802 } 803 804 memset(buf, 0, sizeof(buf)); 805 if (ctime_r(&tp.tv_sec, buf) == NULL) { 806 ntstdio_printf(&ntstdio, "ctime_r error"); 807 return 0; 808 } 809 810 /* 改行コードの削除 */ 811 ret = ntlibc_strlen(buf); 812 buf[ret - 1] = '\0'; 813 814 ntstdio_printf(&ntstdio, "%s .%09u\n", buf, tp.tv_nsec); 815 return 0; 816 } 817 792 818 int usrcmd_info(int argc, char **argv) 793 819 {
Note:
See TracChangeset
for help on using the changeset viewer.