diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-05-28 13:48:06 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-05-28 13:48:06 +0200 |
commit | cbd858544db7aa8307c4d686194df6cc814832af (patch) | |
tree | 8149ea9679bbebc945080ddfc1513169391b6d06 /AK/Time.h | |
parent | 16ea34fc12668c80e7fde25744d8cc75c99bb747 (diff) | |
download | serenity-cbd858544db7aa8307c4d686194df6cc814832af.zip |
LibC: Move struct timeval to sys/time.h. #POSIX
Diffstat (limited to 'AK/Time.h')
-rw-r--r-- | AK/Time.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -2,7 +2,8 @@ namespace AK { -inline void timeval_sub(const struct timeval* a, const struct timeval* b, struct timeval* result) +template<typename TimevalType> +inline void timeval_sub(const TimevalType* a, const TimevalType* b, TimevalType* result) { result->tv_sec = a->tv_sec - b->tv_sec; result->tv_usec = a->tv_usec - b->tv_usec; @@ -12,7 +13,8 @@ inline void timeval_sub(const struct timeval* a, const struct timeval* b, struct } } -inline void timeval_add(const struct timeval* a, const struct timeval* b, struct timeval* result) +template<typename TimevalType> +inline void timeval_add(const TimevalType* a, const TimevalType* b, TimevalType* result) { result->tv_sec = a->tv_sec + b->tv_sec; result->tv_usec = a->tv_usec + b->tv_usec; |