Changeset d3e3a71 in mainline
- Timestamp:
- 2012-04-23T22:35:15Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3293a94
- Parents:
- 56b308e
- Location:
- uspace/lib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/time.c
r56b308e rd3e3a71 876 876 } 877 877 878 /** 879 * Calculate the difference between two times, in seconds. 880 * 881 * @param time1 First time. 882 * @param time0 Second time. 883 * @return Time in seconds. 884 */ 885 double difftime(time_t time1, time_t time0) 886 { 887 return (double) (time1 - time0); 888 } 889 878 890 /** @} 879 891 */ -
uspace/lib/c/include/sys/time.h
r56b308e rd3e3a71 84 84 extern struct tm *localtime(const time_t *timer); 85 85 extern char *ctime(const time_t *timer); 86 extern double difftime(time_t time1, time_t time0); 86 87 extern size_t strftime(char *restrict s, size_t maxsize, 87 88 const char *restrict format, const struct tm *restrict tm); -
uspace/lib/posix/time.c
r56b308e rd3e3a71 311 311 312 312 /** 313 * Calculate the difference between two times, in seconds.314 *315 * @param time1 First time.316 * @param time0 Second time.317 * @return Time in seconds.318 */319 double posix_difftime(time_t time1, time_t time0)320 {321 return (double) (time1 - time0);322 }323 324 /**325 313 * Converts a time value to a broken-down UTC time. 326 314 * -
uspace/lib/posix/time.h
r56b308e rd3e3a71 84 84 extern void posix_tzset(void); 85 85 86 /* Elapsed Time */87 extern double posix_difftime(time_t time1, time_t time0);88 89 86 /* Broken-down Time */ 90 87 extern struct tm *posix_gmtime_r(const time_t *restrict timer, … … 121 118 #define tzset posix_tzset 122 119 123 #define difftime posix_difftime124 125 120 #define gmtime_r posix_gmtime_r 126 121 #define localtime_r posix_localtime_r
Note:
See TracChangeset
for help on using the changeset viewer.