[Maxima] tick and tock functions
macrakis at alum.mit.edu
Wed Dec 27 15:56:03 CST 2006
Why would anyone want tick and tock rather than just time()? Is it
some perl idiosyncracy or something?
Tick and tock are a strange interface to the clock. Why not just
expose the clock itself, and let the user/programmer do the
subtraction? It is easy enough once you have the clock. With regular
double-floats, you have a 52-day clock at 1 nS resolution; if that
isn't good enough, there are always bfloats, which will easily
accomodate any era base-date. The problem with tick and tock is that
t0 is global, so you can't have nested calls; if you want partial
times as well as full times, you have to accumulate them yourself,
etc. Also, why use rationals (with the cost of a GCD on every
operation) rather than floats/bfloats?
More information about the Maxima