rtems 4.9.0 rtems_clock_get API improvements.... not always
Joel Sherrill
joel.sherrill at OARcorp.com
Thu Jun 18 15:39:47 UTC 2009
Maurizio Scavazzon wrote:
>
>
>
>
> > Joel Sherril wrote:
> >
> > Why are you grabbing the timestamp in a printable format? Let the MMI
> > convert the timestamp into a printable format.
>
> I tried to use the timespec as you have suggested, but to extract the
> single day, month, year, hour, minute, seconds information... at the
> end you still need to use the mktime_r function.
> I followed the nsec example in the testusuite directory. In that
> example the ctime function is called to convert timeval to printable
> timestamp... but ctime calls mktm_r ... so the problem is still the same.
>
> Am I missing something? Is there any other way to convert timespec?
>
Do you print every timestamp? Or just selected ones? I was assuming you
timestamped a lot of values and only printed a select few. So delay the
conversion until printing.
If you are printing every time stamp, maybe just printing the timeval/spec
is enough. How are the logs decoded?
All depends on purpose, app usage and how far the conversion can be
delayed. Avoid transformations on "raw" data as long as possible.
>
> Thanks for your knowledge.
Didn't help this time. :)
> Maurizio
>
> ------------------------------------------------------------------------
> Chiama da PC a PC e. taglia i costi delle chiamate!
> <http://messenger.it/chiamarePcPc.aspx>
--
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherrill at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the users
mailing list