Index: uspace/lib/posix/time.c
===================================================================
--- uspace/lib/posix/time.c	(revision e6165bed4794b3ee0af1ee32530fbf6bebde35bf)
+++ uspace/lib/posix/time.c	(revision 1d2a1a9d0629e94f79fea839c32f4125989ecafc)
@@ -51,5 +51,4 @@
 #include "libc/sys/time.h"
 
-// TODO: documentation
 // TODO: test everything in this file
 
@@ -72,5 +71,6 @@
 #define SECS_PER_DAY (SECS_PER_HOUR * HOURS_PER_DAY)
 
-/** Checks whether the year is a leap year.
+/**
+ * Checks whether the year is a leap year.
  *
  * @param year Year since 1900 (e.g. for 1970, the value is 70).
@@ -90,6 +90,7 @@
 }
 
-/** Returns how many days there are in the given month of the given year.
- *  Note that year is only taken into account if month is February.
+/**
+ * Returns how many days there are in the given month of the given year.
+ * Note that year is only taken into account if month is February.
  *
  * @param year Year since 1900 (can be negative).
@@ -113,6 +114,7 @@
 }
 
-/** For specified year, month and day of month, returns which day of that year
- *  it is.
+/**
+ * For specified year, month and day of month, returns which day of that year
+ * it is.
  *
  * For example, given date 2011-01-03, the corresponding expression is:
@@ -134,10 +136,11 @@
 }
 
-/** Integer division that rounds to negative infinity.
- *  Used by some functions in this file.
- *
- * @param op1
- * @param op2
- * @return
+/**
+ * Integer division that rounds to negative infinity.
+ * Used by some functions in this file.
+ *
+ * @param op1 Divident.
+ * @param op2 Divisor.
+ * @return Rounded quotient.
  */
 static time_t _floor_div(time_t op1, time_t op2)
@@ -150,10 +153,11 @@
 }
 
-/** Modulo that rounds to negative infinity.
- *  Used by some functions in this file.
- *
- * @param op1
- * @param op2
- * @return
+/**
+ * Modulo that rounds to negative infinity.
+ * Used by some functions in this file.
+ *
+ * @param op1 Divident.
+ * @param op2 Divisor.
+ * @return Remainder.
  */
 static time_t _floor_mod(time_t op1, time_t op2)
@@ -174,6 +178,7 @@
 }
 
-/** Number of days since the Epoch.
- *  Epoch is 1970-01-01, which is also equal to day 0.
+/**
+ * Number of days since the Epoch.
+ * Epoch is 1970-01-01, which is also equal to day 0.
  *
  * @param year Year (year 1900 = 0, may be negative).
@@ -189,5 +194,6 @@
 }
 
-/** Seconds since the Epoch. see also _days_since_epoch().
+/**
+ * Seconds since the Epoch. see also _days_since_epoch().
  * 
  * @param tm Normalized broken-down time.
@@ -201,5 +207,6 @@
 }
 
-/** Which day of week the specified date is.
+/**
+ * Which day of week the specified date is.
  * 
  * @param year Year (year 1900 = 0).
@@ -214,6 +221,7 @@
 }
 
-/** Normalizes the broken-down time and optionally adds specified amount of
- *  seconds.
+/**
+ * Normalizes the broken-down time and optionally adds specified amount of
+ * seconds.
  * 
  * @param tm Broken-down time to normalize.
@@ -297,6 +305,7 @@
 }
 
-/** Which day the week-based year starts on, relative to the first calendar day.
- *  E.g. if the year starts on December 31st, the return value is -1.
+/**
+ * Which day the week-based year starts on, relative to the first calendar day.
+ * E.g. if the year starts on December 31st, the return value is -1.
  *
  * @param Year since 1900.
@@ -309,5 +318,6 @@
 }
 
-/** Returns week-based year of the specified time.
+/**
+ * Returns week-based year of the specified time.
  *
  * @param tm Normalized broken-down time.
@@ -329,7 +339,8 @@
 }
 
-/** Week number of the year, assuming weeks start on sunday.
- *  The first Sunday of January is the first day of week 1;
- *  days in the new year before this are in week 0.
+/**
+ * Week number of the year, assuming weeks start on sunday.
+ * The first Sunday of January is the first day of week 1;
+ * days in the new year before this are in week 0.
  *
  * @param tm Normalized broken-down time.
@@ -342,9 +353,10 @@
 }
 
-/** Week number of the year, assuming weeks start on monday.
- *  If the week containing January 1st has four or more days in the new year,
- *  then it is considered week 1. Otherwise, it is the last week of the previous
- *  year, and the next week is week 1. Both January 4th and the first Thursday
- *  of January are always in week 1.
+/**
+ * Week number of the year, assuming weeks start on monday.
+ * If the week containing January 1st has four or more days in the new year,
+ * then it is considered week 1. Otherwise, it is the last week of the previous
+ * year, and the next week is week 1. Both January 4th and the first Thursday
+ * of January are always in week 1.
  *
  * @param tm Normalized broken-down time.
@@ -366,7 +378,8 @@
 }
 
-/** Week number of the year, assuming weeks start on monday.
- *  The first Monday of January is the first day of week 1;
- *  days in the new year before this are in week 0. 
+/**
+ * Week number of the year, assuming weeks start on monday.
+ * The first Monday of January is the first day of week 1;
+ * days in the new year before this are in week 0. 
  *
  * @param tm Normalized broken-down time.
@@ -385,6 +398,6 @@
 char *posix_tzname[2];
 
-/** Set timezone conversion information.
- * 
+/**
+ * Set timezone conversion information.
  */
 void posix_tzset(void)
@@ -397,8 +410,9 @@
 }
 
-/** Calculate the difference between two times, in seconds.
- * 
- * @param time1
- * @param time0
+/**
+ * Calculate the difference between two times, in seconds.
+ * 
+ * @param time1 First time.
+ * @param time0 Second time.
  * @return Time in seconds.
  */
@@ -408,10 +422,11 @@
 }
 
-/** This function first normalizes the provided broken-down time
- *  (moves all values to their proper bounds) and then tries to
- *  calculate the appropriate time_t representation.
+/**
+ * This function first normalizes the provided broken-down time
+ * (moves all values to their proper bounds) and then tries to
+ * calculate the appropriate time_t representation.
  *
  * @param tm Broken-down time.
- * @return time_t representation of the time, undefined value on overflow
+ * @return time_t representation of the time, undefined value on overflow.
  */
 time_t posix_mktime(struct posix_tm *tm)
@@ -424,5 +439,6 @@
 }
 
-/** Converts a time value to a broken-down UTC time.
+/**
+ * Converts a time value to a broken-down UTC time.
  *
  * @param timer Time to convert.
@@ -437,5 +453,6 @@
 }
 
-/** Converts a time value to a broken-down UTC time.
+/**
+ * Converts a time value to a broken-down UTC time.
  * 
  * @param timer Time to convert.
@@ -465,5 +482,6 @@
 }
 
-/** Converts a time value to a broken-down local time.
+/**
+ * Converts a time value to a broken-down local time.
  *
  * @param timer Time to convert.
@@ -476,5 +494,6 @@
 }
 
-/** Converts a time value to a broken-down local time.
+/**
+ * Converts a time value to a broken-down local time.
  * 
  * @param timer Time to convert.
@@ -490,6 +509,7 @@
 }
 
-/** Converts broken-down time to a string in format
- *  "Sun Jan 1 00:00:00 1970\n". (Obsolete)
+/**
+ * Converts broken-down time to a string in format
+ * "Sun Jan 1 00:00:00 1970\n". (Obsolete)
  *
  * @param timeptr Broken-down time structure.
@@ -502,6 +522,7 @@
 }
 
-/** Converts broken-down time to a string in format
- *  "Sun Jan 1 00:00:00 1970\n". (Obsolete)
+/**
+ * Converts broken-down time to a string in format
+ * "Sun Jan 1 00:00:00 1970\n". (Obsolete)
  *
  * @param timeptr Broken-down time structure.
@@ -534,5 +555,6 @@
 }
 
-/** Equivalent to asctime(localtime(clock)).
+/**
+ * Equivalent to asctime(localtime(clock)).
  * 
  * @param timer Time to convert.
@@ -548,5 +570,6 @@
 }
 
-/** Reentrant variant of ctime().
+/**
+ * Reentrant variant of ctime().
  * 
  * @param timer Time to convert.
@@ -564,6 +587,7 @@
 }
 
-/** Convert time and date to a string, based on a specified format and
- *  current locale.
+/**
+ * Convert time and date to a string, based on a specified format and
+ * current locale.
  * 
  * @param s Buffer to write string to.
@@ -755,5 +779,6 @@
 }
 
-/** Get clock resolution. Only CLOCK_REALTIME is supported.
+/**
+ * Get clock resolution. Only CLOCK_REALTIME is supported.
  *
  * @param clock_id Clock ID.
@@ -776,9 +801,10 @@
 }
 
-/** Get time. Only CLOCK_REALTIME is supported.
+/**
+ * Get time. Only CLOCK_REALTIME is supported.
  * 
  * @param clock_id ID of the clock to query.
  * @param tp Pointer to the variable where the time is to be written.
- * @return
+ * @return 0 on success, -1 with errno on failure.
  */
 int posix_clock_gettime(posix_clockid_t clock_id, struct posix_timespec *tp)
@@ -800,6 +826,7 @@
 }
 
-/** Set time on a specified clock. As HelenOS doesn't support this yet,
- *  this function always fails.
+/**
+ * Set time on a specified clock. As HelenOS doesn't support this yet,
+ * this function always fails.
  * 
  * @param clock_id ID of the clock to set.
@@ -825,5 +852,6 @@
 }
 
-/** Sleep on a specified clock.
+/**
+ * Sleep on a specified clock.
  * 
  * @param clock_id ID of the clock to sleep on (only CLOCK_REALTIME supported).
@@ -855,5 +883,6 @@
 }
 
-/** Get CPU time used since the process invocation.
+/**
+ * Get CPU time used since the process invocation.
  *
  * @return Consumed CPU cycles by this process or -1 if not available.
