[xquery-talk] Xquery function problem
wolfgangmm at gmail.com
Thu Jan 25 23:12:48 PST 2007
> > So why don't you just measure the time needed for the whole
> > local:transform function call? This can be done using the standard
> > time functions.
> I don't believe so. The current time in the dynamic context
> is stable - i.e. the same each time you call it within the
> execution of a given query.
Yes, sorry, that's correct. But as I sometimes want a quick and dirty
way to measure elapsed time in a query, I use my own, non-stable
function: util:system-time(), which simply maps to
System.currentTimeMillis() in Java and returns xs:time. With this I
can just do
seconds-from-duration(util:system-time() - $startTime)
More information about the talk