1 // operator+ (const cl_time_duration&, const cl_time_duration&)
4 #include "base/cl_sysdep.h"
7 #include "cln/timing.h"
14 const cl_time_duration operator+ (const cl_time_duration& a, const cl_time_duration& b)
16 var uintL sum_sec = a.tv_sec + b.tv_sec;
17 var uintL sum_nsec = a.tv_nsec + b.tv_nsec;
18 if (sum_nsec >= 1000000000) {
19 sum_nsec -= 1000000000;
22 return cl_time_duration(sum_sec,sum_nsec);