Mercurial > hg > octave-lyh
comparison scripts/time/clock.m @ 1374:674a17e1dbab
[project @ 1995-09-11 23:43:20 by jwe]
author | jwe |
---|---|
date | Mon, 11 Sep 1995 23:44:10 +0000 |
parents | 611d403c7f3d |
children | 5d29638dd524 |
comparison
equal
deleted
inserted
replaced
1373:cea4101a2f18 | 1374:674a17e1dbab |
---|---|
26 | 26 |
27 tm = localtime (time ()); | 27 tm = localtime (time ()); |
28 | 28 |
29 retval = zeros (1, 6); | 29 retval = zeros (1, 6); |
30 | 30 |
31 retval(1) = tm.tm_year + 1900; | 31 retval(1) = tm.year + 1900; |
32 retval(2) = tm.tm_mon + 1; | 32 retval(2) = tm.mon + 1; |
33 retval(3) = tm.tm_mday; | 33 retval(3) = tm.mday; |
34 retval(4) = tm.tm_hour; | 34 retval(4) = tm.hour; |
35 retval(5) = tm.tm_min; | 35 retval(5) = tm.min; |
36 retval(6) = tm.tm_sec + tm.tm_usec / 1e6; | 36 retval(6) = tm.sec + tm.usec / 1e6; |
37 | 37 |
38 endfunction | 38 endfunction |