1 /*
2 * $Id: CurrentDateTimeMsFunction.java 1419 2010-11-01 14:12:17Z hoheisel $
3 *
4 * Copyright (c) 2007, The K-Wf Grid Consortium
5 * Fraunhofer Institute for Computer Architecture and Software Technology
6 * See http://www.kwfgrid.eu and http://www.first.fraunhofer.de for more details.
7 */
8
9 package net.kwfgrid.gwes.jaxen;
10
11 import org.jaxen.Function;
12 import org.jaxen.Context;
13 import org.jaxen.FunctionCallException;
14
15 import java.util.List;
16
17 /**
18 * Get the current date time as Milliseconds since 1970.
19 * Returns Double.
20 * @author Andreas Hoheisel
21 * (<a href="http://www.andreas-hoheisel.de">www.andreas-hoheisel.de</a>)
22 * @version $Id: CurrentDateTimeMsFunction.java 1419 2010-11-01 14:12:17Z hoheisel $
23 */
24 public class CurrentDateTimeMsFunction implements Function {
25
26 public Object call(Context context, List list) throws FunctionCallException {
27 Long lvalue = System.currentTimeMillis();
28 return lvalue.doubleValue();
29 }
30
31 }