Message ID | 1447350305-3254-2-git-send-email-ivan.khoronzhuk@linaro.org |
---|---|
State | New |
Headers | show |
On 23.11.15 17:05, Savolainen, Petri (Nokia - FI/Espoo) wrote: > > We use uin64_t for nsec. Doesn't this make it harder to compare against those (API types)? We'd should prioritize API compatibility vs. implementation convenience. It makes. The patch like a proposition, as signed is enough. Will remove this patch in next version. > > -Petri > > >> -----Original Message----- >> From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of EXT >> Ivan Khoronzhuk >> Sent: Thursday, November 12, 2015 7:45 PM >> To: lng-odp@lists.linaro.org >> Subject: [lng-odp] [lng] [API-NEXT PATCH v2 1/7] api: time: use signed >> long for ODP_TIME_* >> >> Use signed long for ODP_TIME_*, that's enough and it allows to >> compare it with signed types, used for instance in timespec type. >> >> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> >> --- >> include/odp/api/time.h | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/include/odp/api/time.h b/include/odp/api/time.h >> index 50a0bf5..2bddb56 100644 >> --- a/include/odp/api/time.h >> +++ b/include/odp/api/time.h >> @@ -24,9 +24,9 @@ extern "C" { >> */ >> >> /* Time in nanoseconds */ >> -#define ODP_TIME_USEC_IN_NS 1000ULL /**< Microsecond in nsec */ >> -#define ODP_TIME_MSEC_IN_NS 1000000ULL /**< Millisecond in nsec */ >> -#define ODP_TIME_SEC_IN_NS 1000000000ULL /**< Second in nsec */ >> +#define ODP_TIME_USEC_IN_NS 1000L /**< Microsecond in nsec */ >> +#define ODP_TIME_MSEC_IN_NS 1000000L /**< Millisecond in nsec */ >> +#define ODP_TIME_SEC_IN_NS 1000000000L /**< Second in nsec */ >> >> /** >> * @typedef odp_time_t >> -- >> 1.9.1 >> >> _______________________________________________ >> lng-odp mailing list >> lng-odp@lists.linaro.org >> https://lists.linaro.org/mailman/listinfo/lng-odp
diff --git a/include/odp/api/time.h b/include/odp/api/time.h index 50a0bf5..2bddb56 100644 --- a/include/odp/api/time.h +++ b/include/odp/api/time.h @@ -24,9 +24,9 @@ extern "C" { */ /* Time in nanoseconds */ -#define ODP_TIME_USEC_IN_NS 1000ULL /**< Microsecond in nsec */ -#define ODP_TIME_MSEC_IN_NS 1000000ULL /**< Millisecond in nsec */ -#define ODP_TIME_SEC_IN_NS 1000000000ULL /**< Second in nsec */ +#define ODP_TIME_USEC_IN_NS 1000L /**< Microsecond in nsec */ +#define ODP_TIME_MSEC_IN_NS 1000000L /**< Millisecond in nsec */ +#define ODP_TIME_SEC_IN_NS 1000000000L /**< Second in nsec */ /** * @typedef odp_time_t
Use signed long for ODP_TIME_*, that's enough and it allows to compare it with signed types, used for instance in timespec type. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> --- include/odp/api/time.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)