I would like to measure the time it takes for my pathfinding function to finish computing but I have no idea how to do that

In Stencyl\plaf\haxe\std\haxe\Timer.hx I saw the following:
/**
Measures the time it takes to execute [f], in seconds with fractions.
This is a convenience function for calculating the difference between
Timer.stamp() before and after the invocation of [f].
The difference is passed as argument to Log.trace(), with "s" appended
to denote the unit. The optional [pos] argument is passed through.
If [f] is null, the result is unspecified.
**/
public static function measure<T>( f : Void -> T, ?pos : PosInfos ) : T {
var t0 = stamp();
var r = f();
Log.trace((stamp() - t0) + "s", pos);
return r;
}
After importing the Timer class I did :
var t:Timer = new Timer(20);
t.measure(myPathfinder.findsomepath());
The result was this error:
Cannot access static field measure from a class instanceAnybody out here that can share some info?