Logged-In As
ACCOUNT
Not Logged In
Document different time structures The NetBSD Project
Status: Closed Time to complete: 120 hrs Mentors: Radoslaw Kujawa, Aleksej Saushev, Julian Coleman, Julian Fagir Tags: C, man, system

We have several time structures like time_t, struct timespec, struct timeval, struct tm and so on. Document all of them as a time(5) manpage such that a programmer can see all of them at once, in comparison. As we have time zone sensitive and time zone independent representations, figuring out conversions between local time and UTC from manual pages is hard and should also be documented in that manpage.

Our preferred format for the submission is some form of plain text, as that is most portable and can be read anywhere.

It would be interesting to have a graph displaying how one can go from one time representation to another too.

Uploaded Work
File name/URL File size Date submitted
time.markdown 2.7 KB December 03 2012 00:52 UTC
time_with_graph.markdown 3.7 KB December 03 2012 00:53 UTC
time_v3.markdown 9.7 KB December 04 2012 09:48 UTC
time_v4.markdown 12.4 KB December 05 2012 02:06 UTC
graph_v4_src.easy-graph 530 bytes December 05 2012 02:07 UTC
graph_v5_src.easy-graph 991 bytes December 05 2012 04:43 UTC
time_v5.markdown 10.7 KB December 05 2012 04:43 UTC
v6.tar.gz 10.0 KB December 05 2012 10:05 UTC
v6_fix.tar.gz 10.0 KB December 05 2012 10:09 UTC
v7.tar.gz 10.0 KB December 06 2012 02:07 UTC
Comments
wmzhere on December 2 2012 23:30 UTC Task Claimed

I would like to work on this task.

Aleksej Saushev on December 2 2012 23:32 UTC Task Assigned

This task has been assigned to wmzhere. You have 120 hours to complete this task, good luck!

wmzhere on December 3 2012 00:53 UTC Ready for review

The work on this task is ready to be reviewed.

Aleksej Saushev on December 3 2012 18:40 UTC Some types missing

time.h lists these types: clock_t


sys/time.h lists these types/structures: bintime, itimerval, itimerspec.


sys/timex.h lists: ntptimeval, timex


sys/timeb.h lists: timeb


In addition to that there exist: useconds_t, suseconds_t, other types that are useful for programmer to know of


 


Please, note also that some values are signed integers, some are unsigned ones. This affects programmer. It is beneficial to have this information in document.

Aleksej Saushev on December 3 2012 18:40 UTC Task Needs More Work

One of the mentors has sent this task back for more work. Talk to the mentor(s) assigned to this task to satisfy the requirements needed to complete this task, submit your work again and mark the task as complete once you re-submit your work.

wmzhere on December 4 2012 09:48 UTC Ready for review

The work on this task is ready to be reviewed.

Aleksej Saushev on December 4 2012 11:41 UTC Fixed width types?

Hi!


Check time_t and clock_t. The difference between platforms suggests that it is fixed width type like uint64_t


Make units more clear, if possible. E.g. when you're talking about bintime, the language is a bit confusing (is time unit 1/2^64 fraction of second? or is it machine-dependent?).


I also suggest that you change generic time/date and timer types places, the former are more important to end user than the latter.


Also, try to typeset graph in better format, e.g. for dot from graphviz package.

Aleksej Saushev on December 4 2012 11:41 UTC Task Needs More Work

One of the mentors has sent this task back for more work. Talk to the mentor(s) assigned to this task to satisfy the requirements needed to complete this task, submit your work again and mark the task as complete once you re-submit your work.

wmzhere on December 5 2012 02:07 UTC Ready for review

The work on this task is ready to be reviewed.

wmzhere on December 5 2012 04:45 UTC Polish of the graph

Hi, 


The default graph is not so good. Now I fine-turned it manually and it looks pretty now.


Please review the 5th version of the files.


Thank you.

Aleksej Saushev on December 5 2012 09:17 UTC Review

timex:


When using abbreviations, they should be introduced correctly. E.g. "parts per million (ppm)". I couldn't guess what "pll" means within 5 seconds. Sure, this means that I didn't work with this sort of things for long time, but normally one shouldn't guess.


timeb:


Please, document how time zone is encoded.

wmzhere on December 5 2012 10:41 UTC Bug fixed

Hi, 


Thank you for your suggestions. In fact I thought "ppm" is a chemical terminology the first time I saw it. :P


And heres the change log:


- Abbreviation expanded.


- Rewrite description of timeb.


- Add (_r) for another form of function and error corrections in graph.


- Rewrite description of the precision section of bintime.


- Make the beginning alpha of one sentense uppercased.


- Add README file.

Aleksej Saushev on December 5 2012 18:54 UTC Review of v.6

Could you clarify what "[The] local timezone in minutes west of Greenwich" means exactly? In particular, consider I'm expressing time in UTC+0400, what should I use then?


Provide URL of home page for easy-graph.


Otherwise, nice.

Aleksej Saushev on December 5 2012 18:54 UTC Task Needs More Work

One of the mentors has sent this task back for more work. Talk to the mentor(s) assigned to this task to satisfy the requirements needed to complete this task, submit your work again and mark the task as complete once you re-submit your work.

wmzhere on December 6 2012 02:08 UTC Ready for review

The work on this task is ready to be reviewed.

Aleksej Saushev on December 6 2012 06:43 UTC Task Closed

Congratulations, this task has been completed successfully.