[zeromq-dev] [zproject] What is the model for int64_t
Pieter Hintjens
ph at imatix.com
Tue Jan 12 19:06:09 CET 2016
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
<michal.vyskocil at gmail.com> 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" <ph at imatix.com>:
>
>> 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
>> <michal.vyskocil at gmail.com> 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"
>> > <ph at imatix.com>:
>> >
>> >> 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
>> >> <michal.vyskocil at gmail.com> 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
>> >> > zeromq-dev at lists.zeromq.org
>> >> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>> >> _______________________________________________
>> >> zeromq-dev mailing list
>> >> zeromq-dev at lists.zeromq.org
>> >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>> >
>> >
>> > _______________________________________________
>> > zeromq-dev mailing list
>> > zeromq-dev at lists.zeromq.org
>> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>> >
>> _______________________________________________
>> zeromq-dev mailing list
>> zeromq-dev at lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
More information about the zeromq-dev
mailing list