[PD] Get current time in seconds since the Epoch using just Vanilla PD

IOhannes m zmölnig zmoelnig at iem.at
Sun Apr 7 21:27:12 CEST 2019


On 4/7/19 8:39 AM, RT wrote:
> Is there a way to get Epoch time in pure data using just Vanilla Objects
> only?
> I looked at http://write.flossmanuals.net/pure-data/time/  but it's in
> extended
> "utime     cxc flatspace     output seconds since epoch and microsecond

well, the current epoch time is something like "1554664910", which will
give you sever headache with Pd's number representation (which is single
precision float): you will (in 2019) only get a time resolution of 128
seconds (not to speak about µsecs)
so i don't think you actually want that value.

apart from that: you can use zexy's [date] and [time] objects to
calculate your own timestamp (based on any epoch you like, or none),
manually circumventing any representation problems you might encounter.

gfmdsa
IOhannes

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20190407/98003851/attachment.sig>


More information about the Pd-list mailing list