Changeset 8119363 in mainline for uspace/lib/c/generic/time.c
- Timestamp:
- 2018-06-26T17:35:40Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6e569bf
- Parents:
- fbfe59d (diff), e768aea (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/time.c
rfbfe59d r8119363 51 51 #include <loc.h> 52 52 #include <device/clock_dev.h> 53 #include <thread.h>54 53 55 54 #define ASCTIME_BUF_LEN 26 … … 487 486 * @param tv2 Second timeval. 488 487 */ 489 void tv_add(struct timeval *tv1, struct timeval *tv2)488 void tv_add(struct timeval *tv1, const struct timeval *tv2) 490 489 { 491 490 tv1->tv_sec += tv2->tv_sec; … … 503 502 * 504 503 */ 505 suseconds_t tv_sub_diff( struct timeval *tv1,struct timeval *tv2)504 suseconds_t tv_sub_diff(const struct timeval *tv1, const struct timeval *tv2) 506 505 { 507 506 return (tv1->tv_usec - tv2->tv_usec) + … … 515 514 * 516 515 */ 517 void tv_sub(struct timeval *tv1, struct timeval *tv2)516 void tv_sub(struct timeval *tv1, const struct timeval *tv2) 518 517 { 519 518 tv1->tv_sec -= tv2->tv_sec; … … 531 530 * 532 531 */ 533 int tv_gt( struct timeval *tv1,struct timeval *tv2)532 int tv_gt(const struct timeval *tv1, const struct timeval *tv2) 534 533 { 535 534 if (tv1->tv_sec > tv2->tv_sec) … … 551 550 * 552 551 */ 553 int tv_gteq( struct timeval *tv1,struct timeval *tv2)552 int tv_gteq(const struct timeval *tv1, const struct timeval *tv2) 554 553 { 555 554 if (tv1->tv_sec > tv2->tv_sec)
Note:
See TracChangeset
for help on using the changeset viewer.