Hi,
I've got a TS-7250 with RTC installed
1) can I print the machine clock time with the micro-second
resolution?
2) how?
So far, I've only been able to have a 10-usec resolution, with the
following C code:
/* Variables */
time_t actual_date;
struct tm *actual_time_tm;
struct timeval tp;
long milli;
/* Time Print */
actual_date = time(NULL);
actual_time_tm = gmtime(&actual_date);
gettimeofday(&tp,(struct timezone *)NULL);
milli=tp.tv_usec/1000;/* For 3 digit resolution */
printf("\nTime: %02d:%02d:%02d.%03d\n", actual_time_tm->tm_hour,
actual_time_tm->tm_min, actual_time_tm->tm_sec, milli);
This prints out something like:
"Time: 09:06:05.770"
"Time: 09:06:05.780"
"Time: 09:06:05.850"
Thanks for your help,
Marco
========================================================================
Groups related to ts-7000
========================================================================
lpc2000 (98 common members)
http://groups.yahoo.com/group/lpc2000?v=1&t=ipt&ch=email&pub=groups&slk=aftr0&sec=recg
Microprocessors/Microcontrollers: The NXP (formerly Philips) LPC2000 family of
ARM M...
nslu2-general (82 common members)
http://groups.yahoo.com/group/nslu2-general?v=1&t=ipt&ch=email&pub=groups&slk=aftr1&sec=recg
Computers & Internet/Hardware: This is the general support group for the NSLU2
ma...
msp430 (64 common members)
http://groups.yahoo.com/group/msp430?v=1&t=ipt&ch=email&pub=groups&slk=aftr2&sec=recg
Computers & Internet/Hardware: Welcome to the MSP430 User's Group! The purpose
of...
motherboardmemorycpu (54 common members)
http://groups.yahoo.com/group/motherboardmemorycpu?v=1&t=ipt&ch=email&pub=groups&slk=aftr3&sec=recg
Computers & Internet/Hardware: The purpose of the group will be to share
informat...
handyboard (52 common members)
http://groups.yahoo.com/group/handyboard?v=1&t=ipt&ch=email&pub=groups&slk=aftr4&sec=recg
Computers & Internet/Hardware: The Handy Board is a 68HC11-based controller
board...
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|