[PD-announce] difftime

David Sabine dave at davesabine.com
Wed Nov 27 01:15:50 CET 2002


Hello all,

I've finished my second external!  This external was actually my initial
goal...but I had a lot of learning to do before I could successfully write
the code and compile it.

Many thanks to Thomas G for pointing me towards the "proxy" object.  and of
course thanks to Iohannes Zmoelnig for writing the "externals-HOWTO". and to
Miller for his wisdom.

The object is available here:
http://www.davesabine.com/media/puredata/difftime.zip
source file and a 'help' file is included.

difftime compares two dates and returns the number of seconds between them.
(Emulating the c/c++ function "difftime()")  With a little ingenuity it
could also be used to emulate "datediff()" from Visual Basic which is
capable of breaking down the result into # of days, #of weeks, #of months,
etc.

It operates similar to PD's basic match objects in terms of its inlets and
outlet.  Dates can be sent to the object in 'lists' which represent yyyy mm
dd hour min sec.  Alternatively, the object accepts the "now" command if you
want to compare a date to the current date/time.

Regards,
Dave S






More information about the Pd-announce mailing list