Signed/unsigned should not be in the data model, IMO. Also it doesn't help us. Ideally zclock wouldn't use int64_t at all (this is my design error), but an abstract type.
Simplest is to define a clock type IMO. On Tue, Jan 12, 2016 at 5:07 PM, Michal Vyskocil <[email protected]> wrote: > Hi, > > What about to add signed = "1" to number type? Or do you prefer unsigned > numbers in the API model? > > Michal > > Dne 12. 1. 2016 11:10 AM napsal uživatel "Pieter Hintjens" <[email protected]>: > >> Ah, I see it's used by zdir for file times, which are in seconds. >> >> zclock uses millisecond times. You could add a type "clock" for >> instance, that becomes int64_t. >> >> On Tue, Jan 12, 2016 at 10:39 AM, Michal Vyskocil >> <[email protected]> wrote: >> > Hi >> > >> > The time type in zproject maps to time_t. >> > >> > I will skip the zclock for now ... >> > >> > Dne 12. 1. 2016 10:05 AM napsal uživatel "Pieter Hintjens" >> > <[email protected]>: >> > >> >> I think zclock's API is poorly designed here; signed ints make no >> >> sense for time. It should be number/8, uint64_t. However, breaking the >> >> API isn't allowed. We can add support for a "time" type in zproject, >> >> which maps to int64_t. >> >> >> >> On Tue, Jan 12, 2016 at 8:44 AM, Michal Vyskocil >> >> <[email protected]> wrote: >> >> > Hi, >> >> > >> >> > >> >> > In zclock class return values are int64_t, where I did not find >> >> > respective model in zproject's API model. Can someone suggest a way >> >> > how to deal with signed integers? >> >> > >> >> > Given the nature of zclock I tried to map it to time type, however >> >> > this translates back to time_t, which is long int only, thus this >> >> > will >> >> > break API/ABI of zclock. >> >> > >> >> > >> >> > -- >> >> > best regards >> >> > Michal Vyskocil >> >> > _______________________________________________ >> >> > zeromq-dev mailing list >> >> > [email protected] >> >> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> >> _______________________________________________ >> >> zeromq-dev mailing list >> >> [email protected] >> >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> > >> > >> > _______________________________________________ >> > zeromq-dev mailing list >> > [email protected] >> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> > >> _______________________________________________ >> zeromq-dev mailing list >> [email protected] >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > _______________________________________________ > zeromq-dev mailing list > [email protected] > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
